From ea435049b3a3f5057b3a894040df3cf4f3256d9e Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 23 Apr 2023 22:33:49 +0200 Subject: Refactored syntax highlighting shortcodes into markdown --- content/blog/docker/cleaning.md | 4 ++-- content/blog/docker/docker-compose-bridge.md | 4 ++-- content/blog/docker/migrate-data-volume.md | 4 ++-- content/blog/docker/shell-usage-in-dockerfile.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'content/blog/docker') diff --git a/content/blog/docker/cleaning.md b/content/blog/docker/cleaning.md index 7326f94..f5a8e99 100644 --- a/content/blog/docker/cleaning.md +++ b/content/blog/docker/cleaning.md @@ -9,6 +9,6 @@ tags: ## The command Be careful that this will delete any stopped container and remove any locally unused images, volumes and tags : -{{< highlight sh >}} +```sh docker system prune -f -a -{{< /highlight >}} +``` diff --git a/content/blog/docker/docker-compose-bridge.md b/content/blog/docker/docker-compose-bridge.md index 8dffe1f..416b8d0 100644 --- a/content/blog/docker/docker-compose-bridge.md +++ b/content/blog/docker/docker-compose-bridge.md @@ -14,7 +14,7 @@ By default, docker-compose will create a network with a randomly named bridge. I For example if your bridge is named docbr1, you need to put your services in `network_mode: “bridge”` and add a custom `network` entry like : -{{< highlight yaml >}} +```yaml version: '3.0' services: @@ -32,4 +32,4 @@ networks: default: external: name: docbr1 -{{< /highlight >}} +``` diff --git a/content/blog/docker/migrate-data-volume.md b/content/blog/docker/migrate-data-volume.md index 9a87f57..5e05e72 100644 --- a/content/blog/docker/migrate-data-volume.md +++ b/content/blog/docker/migrate-data-volume.md @@ -9,9 +9,9 @@ tags: ## The command Here is how to migrate a data volume between two of your hosts. A rsync of the proper `/var/lib/docker/volumes` subfolder would work just as well, but here is a fun way to do it with docker and pipes : -{{< highlight sh >}} +```sh export VOLUME=tiddlywiki export DEST=10.1.0.242 docker run --rm -v $VOLUME:/from alpine ash -c "cd /from ; tar -cpf - . " \ | ssh $DEST "docker run --rm -i -v $VOLUME:/to alpine ash -c 'cd /to ; tar -xfp - ' " -{{< /highlight >}} +``` diff --git a/content/blog/docker/shell-usage-in-dockerfile.md b/content/blog/docker/shell-usage-in-dockerfile.md index 21e81fc..25fc22b 100644 --- a/content/blog/docker/shell-usage-in-dockerfile.md +++ b/content/blog/docker/shell-usage-in-dockerfile.md @@ -14,9 +14,9 @@ The default shell is `[“/bin/sh”, “-c”]`, which doesn't handle pipe fail To process errors when using pipes use this : -{{< highlight sh >}} +```sh SHELL ["/bin/bash", "-eux", "-o", "pipefail", "-c"] -{{< /highlight >}} +``` ## References -- cgit v1.2.3