Download here https://docs.docker.com/get-docker/
Or just copy this one.
cd
to the directory where the Dockerfile
exists.
docker build -t <image_name> .
Pick whatever <image_name>
you like.
After building successfully, test the image by docker run -it <image_name> /bin/bash
.
Register here https://hub.docker.com to get your username
& password
.
Log in and be prompted to input your username
& password
.
docker login
docker tag <image_name> <username>/<repository_name>:latest
Pick whatever <repository_name>
you like.
docker push <username>/<repository_name>:latest
-
Visit:
https://hub.docker.com/repository/docker/<username>/<repository_name>
-
Use it in
devcontainer.json
{ "name": "XXX", "image": "docker.io/<username>/<repository_name>:latest" "customizations": {} }