-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (26 loc) · 1.43 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM alpine:3.19
RUN apk add --no-cache ca-certificates
RUN set -eux; \
# https://github.com/distribution/distribution/releases
version='3.0.0-alpha.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' ;; \
*) 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"; \
echo "$sha256 *registry.tar.gz" | sha256sum -c -; \
tar --extract --verbose --file registry.tar.gz --directory /bin/ registry; \
rm registry.tar.gz; \
registry --version
COPY ./config-example.yml /etc/docker/registry/config.yml
VOLUME ["/var/lib/registry"]
EXPOSE 5000
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/etc/docker/registry/config.yml"]