From 6751d8ff2ae6493db486f93ef412f0a15b0c84e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Str=C3=B6bitzer?= Date: Tue, 8 Oct 2024 13:11:23 +0200 Subject: [PATCH] Review of initial codespaces setup --- 01_hello-docker/README.md | 2 ++ 03_container-lifecycle/README.md | 6 ++++++ 08_build-ignore/README.md | 2 ++ 09_entrypoint-vs-cmd/README.md | 4 ++++ 10_shell-vs-exec-form-variable-substitution/README.md | 2 ++ 11_shell-vs-exec-form-PID1/README.md | 2 ++ 12_multistaged-builds/README.md | 2 ++ 13_caching/README.md | 2 ++ 14_linting/README.md | 2 ++ 15_logs/README.md | 2 ++ 18_docker-compose/README.md | 2 ++ 11 files changed, 28 insertions(+) diff --git a/01_hello-docker/README.md b/01_hello-docker/README.md index 86a5275..255e0a0 100644 --- a/01_hello-docker/README.md +++ b/01_hello-docker/README.md @@ -32,6 +32,8 @@ apt update && apt install -y nginx Now you should see the welcome page of nginx. +> TODO how to open the browser? + ## Exit the container ```bash diff --git a/03_container-lifecycle/README.md b/03_container-lifecycle/README.md index e150bbf..620f7be 100644 --- a/03_container-lifecycle/README.md +++ b/03_container-lifecycle/README.md @@ -30,6 +30,8 @@ docker run -it --name my-busybox busybox:1.32.0 sh -c "while true; do $(echo dat * To detach from the container, press Ctrl+p followed by Ctrl+q. Verify the status of the container. +> TODO does not work on my mac, I am not sure if we can fix this + ```bash docker ps -a ``` @@ -42,6 +44,8 @@ docker ps -a docker attach my-busybox ``` +> TODO docker cli completion seems not to be enabled + * To stop it, press Ctrl+c. Verify the status of the container. ```bash @@ -78,6 +82,8 @@ docker run -it -d --name my-busybox busybox:1.32.0 sh -c "while true; do $(echo docker attach my-busybox ``` +> TODO missing how to exit from container + * Cleanup ```bash diff --git a/08_build-ignore/README.md b/08_build-ignore/README.md index 765a484..09f48fa 100644 --- a/08_build-ignore/README.md +++ b/08_build-ignore/README.md @@ -37,6 +37,8 @@ passwords.txt some-large-image.jpg ``` +> TODO missing .soloution files + * Build the image ```bash diff --git a/09_entrypoint-vs-cmd/README.md b/09_entrypoint-vs-cmd/README.md index 1dd27a2..46bd3f1 100644 --- a/09_entrypoint-vs-cmd/README.md +++ b/09_entrypoint-vs-cmd/README.md @@ -33,6 +33,8 @@ ENTRYPOINT [ "echo" ] CMD [ "hello docker" ] ``` +> TODO missing .soloution files + * Build and run the image ```bash @@ -55,3 +57,5 @@ docker run -it --rm --name entrypoint-vs-cmd entrypoint-vs-cmd:2.0.0 bonjour doc ```bash docker run -it --rm --name entrypoint-vs-cmd --entrypoint sleep entrypoint-vs-cmd:2.0.0 5 ``` + +> TODO missing exit command diff --git a/10_shell-vs-exec-form-variable-substitution/README.md b/10_shell-vs-exec-form-variable-substitution/README.md index 6d3c24f..7e433df 100644 --- a/10_shell-vs-exec-form-variable-substitution/README.md +++ b/10_shell-vs-exec-form-variable-substitution/README.md @@ -36,6 +36,8 @@ docker run -it shell-vs-exec-form-vars:1.0.0 ENTRYPOINT /bin/echo $FOO ``` +> TODO missing .soloution files + > This is shell form of `ENTRYPOINT` ## Rebuild the image diff --git a/11_shell-vs-exec-form-PID1/README.md b/11_shell-vs-exec-form-PID1/README.md index dd45f28..c24c67f 100644 --- a/11_shell-vs-exec-form-PID1/README.md +++ b/11_shell-vs-exec-form-PID1/README.md @@ -36,6 +36,8 @@ docker run -it shell-vs-exec-form-pid1:1.0.0 ENTRYPOINT ps aux ``` +> TODO missing .soloution files + > This is shell form of `ENTRYPOINT` ## Rebuild the image diff --git a/12_multistaged-builds/README.md b/12_multistaged-builds/README.md index 214fa1a..273b10c 100644 --- a/12_multistaged-builds/README.md +++ b/12_multistaged-builds/README.md @@ -44,6 +44,8 @@ COPY --from=builder /build/main . ENTRYPOINT [ "./main" ] ``` +> TODO missing .soloution files + ## Rebuild and run the application ```bash diff --git a/13_caching/README.md b/13_caching/README.md index 4fef9a3..439bc4f 100644 --- a/13_caching/README.md +++ b/13_caching/README.md @@ -70,6 +70,8 @@ ENTRYPOINT [ "npm" ] CMD [ "start" ] ``` +> TODO missing .soloution files + * Do the initial build ```bash diff --git a/14_linting/README.md b/14_linting/README.md index d256d8b..9d20140 100644 --- a/14_linting/README.md +++ b/14_linting/README.md @@ -39,3 +39,5 @@ Dockerfile:7 DL3025 warning: Use arguments JSON notation for CMD and ENTRYPOINT ``` Fix all warning messages and try to fix some info messages in the Dockerfile and run hadolint for verification of your work. + +> TODO missing .soloution files diff --git a/15_logs/README.md b/15_logs/README.md index 10b8a17..2abcc6e 100644 --- a/15_logs/README.md +++ b/15_logs/README.md @@ -38,6 +38,8 @@ You can costumize the log-driver in the file `/etc/docker/daemon.json` via these >This sets the log-driver to `json-file` which is the default. Furthermore, you can define log file rotation by setting the log-opts properties `max-size` and `max-file` . +> TODO not sure if that works... the logs did not show any diff. probably the docker service has to be restarted on the host afterwards + ## Run a container with a specific log-driver > First, make sure syslog-ng is running: diff --git a/18_docker-compose/README.md b/18_docker-compose/README.md index 49dc1f9..bbbb9cc 100644 --- a/18_docker-compose/README.md +++ b/18_docker-compose/README.md @@ -58,6 +58,8 @@ curl localhost:8080/metrics >You can get the external IP via the command `make get-external-ip` in your home directory. +> TODO missing make file - is this still needed at all? + ## Create a Datasource Create a Datasource of type `Prometheus` and the URL `http://prometheus:9090`