From a497b56e36c3bbe526d05514f495f78ca36bb752 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Tue, 16 Jul 2019 05:02:48 -0700 Subject: [PATCH] Simplified readme instructions for Docker run and removed volume - Volume did not work properly as the config would be persistent but not shared across restart of the container running interactively. - Docker run instructions were therefore updated and simplified to bind mount the config directory as volume do not really work in this situation. --- Dockerfile | 1 - README.md | 21 +++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index b36952b6..3294eb75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,6 @@ LABEL org.label-schema.schema-version="1.0.0-rc1" \ org.label-schema.docker.cmd="docker run -it -v /var/run/docker.sock:/var/run/docker.sock lazydocker" \ org.label-schema.version=${VERSION} ENTRYPOINT [ "/bin/lazydocker" ] -VOLUME [ "/.config/jesseduffield/lazydocker" ] ENV PATH=/bin COPY --from=docker-builder /go/src/github.com/docker/cli/build/docker /bin/docker COPY --from=builder /tmp/gobuild/lazydocker /bin/lazydocker \ No newline at end of file diff --git a/README.md b/README.md index f36cc6cf..0f8ad82b 100644 --- a/README.md +++ b/README.md @@ -86,24 +86,25 @@ go get github.com/jesseduffield/lazydocker ```

-1. Create a directory *config* on your host: - - ```sh - mkdir config - ``` 1. Run the container ```sh - docker run -it -v /var/run/docker.sock:/var/run/docker.sock lazyteam/lazydocker + docker run -it -v \ + /var/run/docker.sock:/var/run/docker.sock \ + -v /yourpath:/.config/jesseduffield/lazydocker \ + lazyteam/lazydocker ``` - On Windows, replace `$(pwd)` by `%cd%`. + - Don't forget to change `/yourpath` to an actual path you created to store lazydocker's config + - You can also use this [docker-compose.yml](https://github.com/jesseduffield/lazydocker/blob/master/docker-compose.yml) + - You might want to create an alias, for example: + + ```sh + echo "alias ld='docker run -it -v /var/run/docker.sock:/var/run/docker.sock -v /yourpath/config:/.config/jesseduffield/lazydocker lazyteam/lazydocker'" >> ~/.zshrc + ``` - You can optionally bind mount the config directory with `-v $(pwd)/config:/.config/jesseduffield/lazydocker`, - although it is saved in a volume by default. - You can also use this [docker-compose.yml](https://github.com/jesseduffield/lazydocker/blob/master/docker-compose.yml) For development, you can build the image using: