0
Fork 0
mirror of https://github.com/project-zot/zot.git synced 2025-01-20 22:52:51 -05:00

Clarify defaults for running container image

This commit is contained in:
Josh Dolitsky 2020-01-27 09:44:07 -06:00 committed by GitHub
parent dfd8b84344
commit 98c3237d2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ Examples of config files are available in [examples/](examples/) dir.
The [Dockerfile](./Dockerfile) in this repo can be used to build a container image The [Dockerfile](./Dockerfile) in this repo can be used to build a container image
that runs _zot_. that runs _zot_.
To build the image: To build the image with ref `zot:latest`:
``` ```
make image make image
@ -69,25 +69,21 @@ Then run the image with your preferred container runtime:
``` ```
# with podman # with podman
podman run --rm -p 5000:5000 \ podman run --rm -p 5000:5000 -v $(pwd)/registry:/var/lib/registry zot:latest
-v $(pwd)/registry:/var/lib/registry \
zot:latest
# with docker # with docker
docker run --rm -p 5000:5000 \ docker run --rm -p 5000:5000 -v $(pwd)/registry:/var/lib/registry zot:latest
-v $(pwd)/registry:/var/lib/registry \
zot:latest
``` ```
By default, the server will use no auth, listen on port 5000, This will run a registry at http://localhost:5000, storing content at `./registry`
and store content at `/var/lib/registry`. (bind mounted to `/var/lib/registry` in the container). By default, auth is disabled.
If you wish use custom configuration settings, you can override If you wish use custom configuration settings, you can override
the YAML config file located at `/etc/zot/config.yml`: the YAML config file located at `/etc/zot/config.yml`:
``` ```
# Example: using a local file "custom-config.yml" that # Example: using a local file "custom-config.yml" that
# listens on port 8080 and uses /tmp/zot for storage # listens on port 8080 and uses /tmp/zot for storage root
podman run --rm -p 8080:8080 \ podman run --rm -p 8080:8080 \
-v $(pwd)/custom-config.yml:/etc/zot/config.yml \ -v $(pwd)/custom-config.yml:/etc/zot/config.yml \
-v $(pwd)/registry:/tmp/zot \ -v $(pwd)/registry:/tmp/zot \