Teacher's Manual
  • Introduction
  • Answering Questions on Piazza
  • Notable questions
  • Chesterton's Fence
  • Docker Essentials
  • Notes on curriculum design
  • Notes on presenting
  • Pair Teaching
  • Eliciting Questions During Class
  • Office Hours
  • Open Office Hours
  • How To Write Tests
  • Beginner-friendly Code Style Guide
  • rails grade
  • Audit Requests
  • Setting Up Canvas
  • Setting Up GitHub
  • Preparing for Day 1
  • Syllabus
  • How To Create A Project
  • How To Setup an LTI Assignment
  • LTI Tools
    • Grades
  • Possible Format For Lecture Notes
  • Configuring Cloud9
  • Projects Checklist
    • AD1 HW Checklist
    • AD1 Gitpod Extensions and Settings
    • AD2 HW Checklist
    • Adding Dependencies to a Project
    • Adding Specs to a README
    • Updating Gitpod Docker Image
    • Updating Old Projects Checklist
  • Integrating GitHub with Slack
  • Mastering Git
  • Class Recordings
  • How to update Youcanbook.me
  • Swag
Powered by GitBook
On this page
  • Prerequisites
  • Instructions
  • Add install instructions to the Dockerfile
  • Re-buildin the image
  • Update gitpod.yml to use new image
  • Test new image in Gitpod
  1. Projects Checklist

Adding Dependencies to a Project

PreviousAD2 HW ChecklistNextAdding Specs to a README

Last updated 2 years ago

Prerequisites

  • Have Docker installed

  • Have a Dockerhub account

  • Might be worth reading the 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 expect

To 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 expect

Once you've added all the dependencies to the Dockerfile, you need to re-build the image.

Re-buildin the image

  1. docker build -t USERNAME/IMAGE_NAME .

  2. docker push IMAGE_NAME

Which might look like:

docker build -t jelaniwoods/my-cool-image
docker push jelaniwoods/my-cool-image

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.

# .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 branch

    • You 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!

Docker Essentials guide