COSC 1209 Assignment 1 (Docker File)
COSC 1209 Assignment 1 (Docker File)
Containers
This assignment will cover the creation and deployment of docker containers using dockerfiles and
docker compose. A simple node.js application will be provided to you that you will convert to a
containerized application.
Part 1
Create a dockerfile with the following specifications, include a screenshot in your submission showing
your file. All commands should be part of your dockerfile.
Run the docker container using docker compose up --build -d Include a screenshot of your container
running on localhost:3000, add your student ID and your name as items. (3 marks)
You can stop your docker container with the docker compose down command.
Part 2
Now that you have established a basic containerized application, the next step will be creating a
database that will allow your data to persist when the container restarts.
In the docker compose.yaml file create a new service called db that uses the postgres image. Add the
following configuration to this service, include a screenshot in your submission showing your file.
Start your application using docker compose up --build -d. Provide a screenshot showing a list of all
running docker containers. (4 marks)