Refactored syntax highlighting shortcodes into markdown
This commit is contained in:
parent
9e6bb1a3e5
commit
ea435049b3
71 changed files with 297 additions and 297 deletions
|
@ -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 >}}
|
||||
```
|
||||
|
|
|
@ -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 >}}
|
||||
```
|
||||
|
|
|
@ -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 >}}
|
||||
```
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue