Merge pull request #166 from milosgajdos/docker-distribution

Change config path and update the config file
This commit is contained in:
Milos Gajdos 2024-07-10 14:39:47 +01:00 committed by GitHub
commit a943e89c3e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 28 additions and 19 deletions

View File

@ -1,18 +1,18 @@
FROM alpine:3.19
FROM alpine:3.20
RUN apk add --no-cache ca-certificates
RUN set -eux; \
# https://github.com/distribution/distribution/releases
version='3.0.0-alpha.1'; \
version='3.0.0-beta.1'; \
apkArch="$(apk --print-arch)"; \
case "$apkArch" in \
x86_64) arch='amd64'; sha256='968a6dcc648aa842963ae00a28128200b6134732ff73db6fc1e52c6f9099d1f9' ;; \
aarch64) arch='arm64'; sha256='4f0d3ab06b8f77abf5ae39f08a214c2451b9eec4b1b9bb2eb9b9b9da3a3ad4cf' ;; \
armhf) arch='armv6'; sha256='5ac4ac9cd5c7c658cd719efc44a67a0ef4b03e0618aa359ae726938eade66300' ;; \
armv7) arch='armv7'; sha256='3c2eb167a162a17453dee0e43fb97b5abb771decf60b492e2867a2354fd0618d' ;; \
ppc64le) arch='ppc64le'; sha256='1e39ce43428437faf31f5df636d94c4dc21958076ebf96c1bd3baf67c3f7199a' ;; \
s390x) arch='s390x'; sha256='94c53ba2254013b3e38d0c0a8d8005e41681f1f394c23a61db9953d61c134c07' ;; \
x86_64) arch='amd64'; sha256='96344f15da3ddbef8cf300f9642d03a2b0a7aaa0b593dfe89a9ad266c5aa4ff4' ;; \
aarch64) arch='arm64'; sha256='62e3e0c168f62ac274672446a3f6ea89ebdfedc6630e4b02d93900b7022dbe88' ;; \
armhf) arch='armv6'; sha256='01a5373d1e05bf539a1ddf5892c3bfa7377bbc02b340f6260eb7a3c62da99897' ;; \
armv7) arch='armv7'; sha256='fb3748b3108950ba3a0b2868f4cd2317ab308d7436944bdcd3ac62f734b68eb5' ;; \
ppc64le) arch='ppc64le'; sha256='eccd060cf2d0d801fad27994d09aa43c945629cff7664f5d27bee9698b58f2a6' ;; \
s390x) arch='s390x'; sha256='b4c415a28c9d58453455068542e92b94b080dbbbc6e990f2360098a64756c71d' ;; \
*) echo >&2 "error: unsupported architecture: $apkArch"; exit 1 ;; \
esac; \
wget -O registry.tar.gz "https://github.com/distribution/distribution/releases/download/v${version}/registry_${version}_linux_${arch}.tar.gz"; \
@ -21,12 +21,12 @@ RUN set -eux; \
rm registry.tar.gz; \
registry --version
COPY ./config-example.yml /etc/docker/registry/config.yml
COPY ./config-example.yml /etc/distribution/config.yml
VOLUME ["/var/lib/registry"]
EXPOSE 5000
COPY docker-entrypoint.sh /entrypoint.sh
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/etc/docker/registry/config.yml"]
CMD ["/etc/distribution/config.yml"]

View File

@ -1,5 +1,5 @@
# About this Repo
This is the Git repo of the Docker Official Image for [distribution](https://registry.hub.docker.com/_/registry/).
This is the Git repo of the Docker Official Image for [registry](https://registry.hub.docker.com/_/registry/).
See the [Docker Hub page](https://hub.docker.com/_/registry) for the full readme on how to use the Docker image and
for information regarding contributing and issues.

View File

@ -1,16 +1,25 @@
version: 0.1
log:
level: debug
fields:
service: registry
environment: development
storage:
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
delete:
enabled: true
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
tag:
concurrencylimit: 5
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
addr: :5000
debug:
addr: :5001
prometheus:
enabled: true
path: /metrics
health:
storagedriver:
enabled: true