From 11ac363edef21088c5a2aa3363c9953ecdaf89ba Mon Sep 17 00:00:00 2001 From: Tero Nikula <37400796+ziirou@users.noreply.github.com> Date: Thu, 4 Sep 2025 10:57:51 +0300 Subject: [PATCH 1/3] Update part12c.md Use the same Nginx version (`nginx:1.25-alpine`) as earlier (Part 12c: Using multiple stages). --- src/content/12/en/part12c.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/12/en/part12c.md b/src/content/12/en/part12c.md index 5a78e95503..0d82b18a7d 100644 --- a/src/content/12/en/part12c.md +++ b/src/content/12/en/part12c.md @@ -486,7 +486,7 @@ services: app: # ... nginx: - image: nginx:1.20.1 + image: nginx:1.25-alpine volumes: - ./nginx.dev.conf:/etc/nginx/nginx.conf:ro ports: @@ -500,9 +500,9 @@ with that added, we can run _docker compose -f docker-compose.dev.yml up_ and se ```bash $ docker container ls -CONTAINER ID IMAGE COMMAND PORTS NAMES -a02ae58f3e8d nginx:1.20.1 ... 0.0.0.0:8080->80/tcp reverse-proxy -5ee0284566b4 hello-front-dev ... 0.0.0.0:5173->5173/tcp hello-front-dev +CONTAINER ID IMAGE COMMAND PORTS NAMES +a02ae58f3e8d nginx:1.25-alpine ... 0.0.0.0:8080->80/tcp reverse-proxy +5ee0284566b4 hello-front-dev ... 0.0.0.0:5173->5173/tcp hello-front-dev ``` Connecting to http://localhost:8080 will lead to a familiar-looking page with 502 status. From 5a1ab5dec2fed9689c47130601a18e4c9f4399a3 Mon Sep 17 00:00:00 2001 From: Tero Nikula <37400796+ziirou@users.noreply.github.com> Date: Thu, 4 Sep 2025 11:44:47 +0300 Subject: [PATCH 2/3] Update part12c.md `bash` is not included in the `nginx:1.25-alpine` image. Got this error: `OCI runtime exec failed: exec failed: unable to start container process: exec: "bash": executable file not found in $PATH: unknown` Use `sh` instead of `bash`: `docker exec -it reverse-proxy sh` --- src/content/12/en/part12c.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/12/en/part12c.md b/src/content/12/en/part12c.md index 0d82b18a7d..8ee29cd487 100644 --- a/src/content/12/en/part12c.md +++ b/src/content/12/en/part12c.md @@ -512,9 +512,9 @@ This is because directing requests to http://localhost:5173 leads to nowhere as Let's test this by going inside the Nginx container and using curl to send a request to the application itself. In our usage curl is similar to wget, but won't need any flags. ```bash -$ docker exec -it reverse-proxy bash +$ docker exec -it reverse-proxy sh -root@374f9e62bfa8:\# curl http://localhost:80 +/ # curl http://localhost:80 502 Bad Gateway ... @@ -551,7 +551,7 @@ services: app: # ... nginx: - image: nginx:1.20.1 + image: nginx:1.25-alpine volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: @@ -691,7 +691,7 @@ services: # no ports here! nginx: - image: nginx:1.20.1 + image: nginx:1.25-alpine volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro ports: From bf492ce44795e261c8471fb9dfe0faa885b103d2 Mon Sep 17 00:00:00 2001 From: Tero Nikula <37400796+ziirou@users.noreply.github.com> Date: Thu, 4 Sep 2025 12:02:21 +0300 Subject: [PATCH 3/3] Update part12c.md There is no user and hostname visible when using `sh`. --- src/content/12/en/part12c.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/12/en/part12c.md b/src/content/12/en/part12c.md index 8ee29cd487..52ab828c16 100644 --- a/src/content/12/en/part12c.md +++ b/src/content/12/en/part12c.md @@ -525,7 +525,7 @@ To help us, Docker Compose has set up a network when we ran _docker compose up_. Since we are inside the container, we can also test the DNS! Let's curl the service name (app) in port 5173 ```html -root@374f9e62bfa8:\# curl http://app:5173 +/ # curl http://app:5173