From ba83c670b4ee0838766c0a95e8c2ea7c50cb7a66 Mon Sep 17 00:00:00 2001 From: Igor Minin Date: Mon, 9 Sep 2024 16:29:00 +0300 Subject: [PATCH] Improved README secion about running a local copy in the Docker container --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 62eecbf..30842af 100644 --- a/README.md +++ b/README.md @@ -43,19 +43,22 @@ Docker In order to run your own copy of the book with gitbook within a local container: -1. Enable Docker experimental features with vim or another text editor +1. (Optional) Enable Docker experimental features (if you want to `--squash` image layers) with vim or another text editor: ```bash - sudo vim /usr/lib/systemd/system/docker.service + EDITOR=vim sudoedit /etc/docker/daemon.json ``` - Then add --experimental=true to the end of the ExecStart=/usr/bin/dockerd -H fd:// line and save. + Then add `"experimental": true` to the JSON and save. E.g. in case if you initially had empty `daemon.json` the result should be: - Eg: *ExecStart=/usr/bin/dockerd -H fd:// --experimental=true* + ```json + { + "experimental" : true + } + ``` - Then, you need to reload and restart the Docker daemon: + Finally, restart the Docker daemon: ```bash - systemctl daemon-reload - systemctl restart docker.service + systemctl restart --now docker.service ``` 2. Run docker image