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.
pull/36/head
Quentin McGaw 5 years ago
parent 84320dd4de
commit a497b56e36

@ -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

@ -86,24 +86,25 @@ go get github.com/jesseduffield/lazydocker
```
</p></details>
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:

Loading…
Cancel
Save