Skip to content

Commit

Permalink
final tweaks 2024 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
mluukkai committed Mar 16, 2024
1 parent 1ad5e8a commit 1ecb7b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
12 changes: 1 addition & 11 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ We hope that you enjoy the course and find it informative and engaging. Good luc

The course is suitable for anyone interested in Docker or containerization and has at least some experience with the Linux command line. It also helps if you have some experience in web development.

### Updating of the material for the 2024 edition

The 2024 edition of the course started on 11th March. The material is currently being updated. At the time of writing (16th March) the following parts have already been updated

- Part 1
- Part 2
- Part 3 up to and including exercise 3.7

You may continue already beyond the updated material but beware, there might be some outdated content!

### About different architectures and contributing

Please note that while Docker runs on all major operating systems and even on ARM architecture, this course material may not cover platform-specific details for all operating systems. However, we've had students successfully complete the course using a variety of machines and operating systems.
Expand All @@ -36,7 +26,7 @@ If you encounter any issues while working through the course material on your pa

We welcome contributions to the course material from students and other members of the DevOps community! If you notice any mistakes, typos, or errors in the material, please consider submitting a pull request to the course repository on GitHub.

Thank you in advance for your contributions to this open source project!
Thank you in advance for your contributions to this open-source project!

### Grading

Expand Down
12 changes: 6 additions & 6 deletions docs/part-3/section-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,19 @@ FROM nginx:1.19-alpine
COPY --from=build-stage /usr/app/_site/ /usr/share/nginx/html
```

Now Docker copies contents from the first image `/usr/app/_site/` to `/usr/share/nginx/html` Note the naming from Ruby to _build-stage_. We could also use an external image as a stage, `--from=python:3.7` for example.
Now Docker copies contents from the first image `/usr/app/_site/` to `/usr/share/nginx/html` Note the naming from Ruby to _build-stage_. We could also use an external image as a stage, `--from=python:3.12` for example.

Let's build and check the size difference:

```console
$ docker build . -t jekyll
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
jekyll latest 5f8839505f37 37 seconds ago 109MB
ruby latest 616c3cf5968b 28 hours ago 870MB
REPOSITORY TAG IMAGE ID CREATED SIZE
jekyll nginx 9e2f597ad99e 8 seconds ago 21.3MB
jekyll ruby 5dae3d9f8dfb 26 minutes ago 1.05GB
```

As you can see, even though our Jekyll image needed Ruby during the build stage, it is considerably smaller since it only has Nginx and the static files. `docker container run -it -p 8080:80 jekyll` also works as expected.
As you can see, even though our Jekyll image needed Ruby during the build stage, it is considerably smaller since it only has Nginx and the static files in the resulting image. `docker run -it -p 8080:80 jekyll:nginx` also works as expected.

Often the best choice is to use a FROM **scratch** image as it doesn't have anything we don't explicitly add there, making it the most secure option over time.

Expand All @@ -299,7 +299,7 @@ Often the best choice is to use a FROM **scratch** image as it doesn't have anyt

Let us do a multi-stage build for the [backend](https://github.com/docker-hy/material-applications/tree/main/example-backend) project since we've come so far with the application.

The project is in golang and building a binary that runs in a container, while straightforward, isn't exactly trivial. Use resources that you have available (Google, example projects) to build the binary and run it inside a container that uses `FROM scratch`.
The project is in Golang and building a binary that runs in a container, while straightforward, isn't exactly trivial. Use resources that you have available (Google, example projects) to build the binary and run it inside a container that uses `FROM scratch`.

To successfully complete the exercise the image must be smaller than <b>25MB</b>.

Expand Down

0 comments on commit 1ecb7b5

Please sign in to comment.