Skip to content

Commit a4550ca

Browse files
authored
Clarifications in the containers exercise
1 parent ba4e11a commit a4550ca

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

02_virtualization_and_containers/virtualmachines_containers_exercise.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,12 @@ This exercise consists of the following main steps:
293293
1. Create a fork of the GitLab repository ["Exercise Containers"](https://gitlab-sim.informatik.uni-stuttgart.de/simulation-software-engineering-wite2526/exercise-containers).
294294
2. Setting up the `Dockerfile`
295295
- Base your image on Ubuntu 24.04
296-
- Create a file called `testfile` that contains `USERNAME`. This file should be copied to a directory called `/testfiles` inside the container.
296+
- Install `fastfetch` or `neofetch` inside the container
297+
- Create a file called `testfile` that contains `USERNAME`. Using a `COPY`, copy this file to a directory called `/testfiles` inside the container.
297298
- Set the environment variable `ENV_TEST_VARIABLE` inside the container.
298299
- Define a default run command for the container.
299-
- Install `fastfetch` or `neofetch` inside the container
300300
- Test the new container
301-
3. Run `fastfetch` or `neofetch` in a terminal inside the container and take a screenshot
301+
3. Manually run `fastfetch` or `neofetch` in a terminal inside the container at runtime and take a screenshot
302302
4. Create a merge request containing your changes.
303303
304304
#### 1. Create a Fork (Docker)
@@ -310,11 +310,11 @@ Fork and clone the repository mentioned above. The repository initially contains
310310
- Currently, the [`Dockerfile`](https://docs.docker.com/reference/dockerfile/) is empty. Edit the file such that a container image with the following properties is built:
311311
- Your virtual machine should be based on the [`alpine:latest` image](https://hub.docker.com/_/alpine).
312312
- Alternatively, you can use the (larger) [`ubuntu:24.04` image](https://hub.docker.com/_/ubuntu).
313-
- Create a new file with the name `testfile` and add it to the repository. The file should contain your `USERNAME` as text. Add the file to your container and place it in directory `/testfiles`.
314-
- Set the environment variable `ENV_TEST_VARIABLE` to have the value of your `USERNAME`.
315-
- Make sure that the default command to be executed when running the container is `/bin/bash`.
316313
- Install `fastfetch` (Alpine) or `neofetch` (Ubuntu).
317314
- **Note:** In the `Dockerfile` you do not have to prefix commands such as `apt` with `sudo` since the script is executed with superuser rights.
315+
- Create a new file with the name `testfile` and add it to the repository. The file should contain your `USERNAME` as text. Add the file to your container and place it in directory `/testfiles` using `COPY`.
316+
- Set the environment variable `ENV_TEST_VARIABLE` to have the value of your `USERNAME`.
317+
- Make sure that the default command to be executed when running the container is `/bin/bash`.
318318
- Test your Docker container locally. Are all variables set and files available?
319319
- **Note:** If you rebuild your container often, you might end up with dangling containers. You can remove them (together with any unused images, containers, or objects) with [`docker [image|container|system] prune`)](https://docs.docker.com/engine/reference/commandline/system_prune/) depending on what you want to remove. To delete everything unused: `docker system prune`.
320320

0 commit comments

Comments
 (0)