The purpose of this assignment is to ensure that everyone gains hands-on practice on creating Docker images from Dockerfile
s.
Create a public repository on GitHub.com repo under your personal username called dsci310-dockerfile-practice
. Select the option to create the repository with a README
file.
Add a Dockerfile
to it. This Dockerfile should extend the Jupyter team’s r-notebook
image. In particular, the quay.io/jupyter/r-notebook:2023-11-19
image. This is the image you should refer to in the FROM
statement in your Dockerfile.
Add a Docker RUN
command so that at least two new Python or R package is installed using conda
when the Docker image is built from the Dockerfile
. Ensure that you pin the version of the package you add.
Build your Dockerfile
and test it locally.
Add a GitHub Actions workflow to automatically:
We recommend doing this by:
by clicking the Actions tab and selecting “Skip this and setup a workflow yourself”
paste this workflow into the empty file: https://github.com/ttimbers/dsci310-dockerfile-practice/blob/main/.github/workflows/docker-publish.yml (also edit the name to edit the name of the file to be docker-publish.yml
instead of main.yml
).
edit the workflow file on line 32 so that the Docker image will be pushed to your DockerHub user space (and not mine!)
add your DockerHub username and password (naming them DOCKER_USERNAME
and DOCKER_PASSWORD
, respectively) as GitHub secret (Under Settings > Secrets and variables > Actions > New repository secret) to this repository for this to work.
(As Needed): Make sure that the GitHub Actions workflow to build and publish the Docker image get triggered. The docker-publish.yml
file can be be triggered by either:
Dockerfile
, orAdd a LICENSE
file that attributes the usage of my docker-publish.yml
file in your repository.
This means, you need to copy the LICENSE
file contents from
https://github.com/ttimbers/dsci310-dockerfile-practice/blob/main/LICENSE
and include the text in your LICENSE
file.
You also want to add a note in that file that this only covers the code you copied from me
(docker-publish.yml
).
You will submit a PDF to Gradescope for individual assignment 3 that includes:
dsci310-dockerfile-practice
.dsci310-dockerfile-practice
.This assignment will be graded for completion as follows:
Grade | Description |
---|---|
-15% | There were issues with the links submitted that made it difficult to find the GitHub or DockerHub repository |
-15% | The version is missing from the package that was added to the Dockerfile |
-15% | There were authentication issues with publishing to Docker Hub. |
-33% | No new package was added to the Dockerfile |
-33% | Docker image was not built successfully by GitHub actions and published to DockerHub |
-100% | Assignment was not completed (no GitHub repository was created, or the repository is missing the Dockerfile ) |