Add new Dockerfile and README instructions

Signed-off-by: Josh Dolitsky <393494+jdolitsky@users.noreply.github.com>
This commit is contained in:
Josh Dolitsky
2020-01-24 11:54:38 -06:00
parent d50a07c149
commit dfd8b84344
3 changed files with 72 additions and 1 deletions
+41 -1
View File
@@ -42,18 +42,58 @@ make binary-stacker
```
make
```
Build artifacts are in bin/
# Serving
```
bin/zot serve _config-file_
```
Examples of config files are available in [examples/](examples/) dir.
# Container Image
The [Dockerfile](./Dockerfile) in this repo can be used to build a container image
that runs _zot_.
To build the image:
```
make image
```
Then run the image with your preferred container runtime:
```
# with podman
podman run --rm -p 5000:5000 \
-v $(pwd)/registry:/var/lib/registry \
zot:latest
# with docker
docker run --rm -p 5000:5000 \
-v $(pwd)/registry:/var/lib/registry \
zot:latest
```
By default, the server will use no auth, listen on port 5000,
and store content at `/var/lib/registry`.
If you wish use custom configuration settings, you can override
the YAML config file located at `/etc/zot/config.yml`:
```
# Example: using a local file "custom-config.yml" that
# listens on port 8080 and uses /tmp/zot for storage
podman run --rm -p 8080:8080 \
-v $(pwd)/custom-config.yml:/etc/zot/config.yml \
-v $(pwd)/registry:/tmp/zot \
zot:latest
```
# Ecosystem
Since we couldn't find clients or client libraries that are stictly compliant to