A distributable Docker Registry v2 build for ARMv6 targeted at older Raspberry Pi SBCs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
985 B

  1. # Compile binaries
  2. FROM arm32v6/golang:alpine as builder
  3. ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
  4. ENV DOCKER_BUILDTAGS include_oss include_gcs
  5. ARG VERSION=master
  6. RUN set -ex \
  7. && apk add --no-cache --virtual .build-deps \
  8. make \
  9. git \
  10. && git clone -b $VERSION https://github.com/docker/distribution.git $DISTRIBUTION_DIR
  11. WORKDIR $DISTRIBUTION_DIR
  12. RUN mkdir -p /etc/docker/registry \
  13. && cp cmd/registry/config-dev.yml /etc/docker/registry/config.yml
  14. RUN make PREFIX=/go clean binaries \
  15. && apk del --purge .build-deps
  16. # Build a minimal distribution
  17. FROM alpine:latest
  18. label maintainer="Tamás Gérczei <tamas@gerczei.eu>"
  19. COPY --from=builder /go/bin/registry /bin/registry
  20. COPY --from=builder /go/src/github.com/docker/distribution/cmd/registry/config-example.yml /etc/docker/registry/config.yml
  21. VOLUME ["/var/lib/registry"]
  22. EXPOSE 5000
  23. ENTRYPOINT ["/bin/registry"]
  24. CMD ["serve", "/etc/docker/registry/config.yml"]