Lab 9: Containers
We’ve seen how containers work, but using them is far more fun! In this lab, you’ll use containers to deploy a service as well as package up your first project so it can run under a pre-configured environment.
Deploying a Service
We saw a small example of deploying RetroArch in class. Find another type of service to run on your VM. It could be a web server, git forge, media server… whatever you’d like! If you are having trouble choosing, ask your classmates or the course staff for ideas.
Make sure you’ve installed Docker (or Podman!) on your VM and then set up the service. Forward any relevant ports to your local machine with SSH so you can confirm that you can connect to the service and use it.
Packaging Software
The next thing you’ll need to do in this lab is package Project 1 to run in a container. Create a Dockerfile that will generate an Arch Linux container instance, install necessary software packages, compile your project, and run it! You can use docker build
to create a container image from a Dockerfile.
Grading and Submission
Once you are finished with the lab, check your code into a directory called lab9
in your lab repository.
To receive 50% credit:
- Install and demonstrate a containerized service of your choice.
To receive 100% credit:
- Complete all previous requirements
- Write a dockerfile for your Project 1
- Demonstrate Project 1 working on your local Mac/Windows machine