-
Login account at local
docker login -u <your-username> -p <your-password>
-
Build Image
docker build -t <your-dockerhub-username>/<image-name>:<tag> .
-
Push Image
docker push <your-dockerhub-username>/<image-name>:<tag>
-
Pull Image
docker pull <your-dockerhub-username>/<image-name>:<tag>
-
Run Container
docker run -d -p <external-port>:<internal-port> <your-dockerhub-username>/<image-name>:<tag>
-
Login account at local
echo <YOUR_PERSONAL_ACCESS_TOKEN> | docker login ghcr.io -u <YOUR_GITHUB_USERNAME> --password-stdin
-
Build Image
docker build -t ghcr.io/<your-github-username>/<image-name>:<tag> .
-
Push Image
docker push ghcr.io/<your-github-username>/<image-name>:<tag>
-
Pull Image
docker pull ghcr.io/<your-github-username>/<image-name>:<tag>
-
Run Container
docker run -d -p <external-port>:<internal-port> ghcr.io/<your-github-username>/<image-name>:<tag>
-
List Container is running
docker ps
-
Check log of Container
docker logs <container-id>