Updating Gitpod Docker Image
Updating Gitpod Docker image
Pull Image from Docker Hub
docker pull <image-name>
See available Docker Images
docker images
See running containers
docker ps
Run Image Interactively
docker run -it <image-name>
Add Your Change To The The Image
This could be a bundle update
, or installing a CLI tool.
Once you make the change DON'T EXIT THE IMAGE YET.
The changes only save if you commit them.
Grab the Container ID and then exit.
Commit The Change
Open a new Terminal and find the container id for the image you made the change in.
commit
docker commit CONTAINER_ID <image-name>
Example
docker commit 71HN7K1GCDd0183 jelaniwoods/appdev-ruby2_6_5
Push to Docker Hub
docker push <image-name>
Example
docker push jelaniwoods/appdev-ruby2_6_5
Creating a Docker Image for Gitpod
Start From Template Docker
https://github.com/firstdraft/appdev_template/blob/master/files/Dockerfile
Run Image Interactively
docker run -it <image-name>
Tag and Commit
tag
docker tag username/app-name username/app-name:v1
commit
docker commit -m "message" CONTAINER_ID
Build
In the directory conatining the Dockefile
docker build -t <image-name> .
If the Dockerfile
is named something else:
docker build -t <image-name> . -f <path-to-file-name>
Last updated