Adding Dependencies to a Project
Prerequisites
Have Docker installed
Have a Dockerhub account
Might be worth reading the Docker Essentials guide if you're new to Docker.
Instructions
Add install instructions to the Dockerfile
For example, to install the expect command line tool normally (on Ubuntu), you run this command in the Terminal:
sudo apt install -y expectTo install the tool in the Docker image you can preface the install command with RUN to the Dockerfile, like this:
RUN sudo apt install -y expectOnce you've added all the dependencies to the Dockerfile, you need to re-build the image.
Re-buildin the image
docker build -t USERNAME/IMAGE_NAME .docker push IMAGE_NAME
Which might look like:
docker build -t jelaniwoods/my-cool-image
docker push jelaniwoods/my-cool-imageUpdate gitpod.yml to use new image
Replace the value of the image key with the name of the image you pushed in the previous step.
# .gitpod.yml
image: jelaniwoods/my-cool-image
tasks:
- before: |
bin/setup
...Test new image in Gitpod
Switch to a new git branch and commit your file changes
Push branch to GitHub
Open branch in Gitpod
gitpod.io/#+ GitHub URL for branchYou should see Gitpod downloading the newer image
Verify the new changes work the way you expect
There's the correct Ruby version,
rails grade,/gitall work, etc
Merge changes to
main/masterbranch
That's it!
Last updated