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:
To install the tool in the Docker image you can preface the install command with RUN
to the Dockerfile
, like this:
Once 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:
Update 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.
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
,/git
all work, etc
Merge changes to
main
/master
branch
That's it!
Last updated