Browse Source

Merge branch 'master' into 'master'

get code from release tar instead of git-clone

See merge request mario/docker-registry!1
keep-around/78c38b6046b356541e026dc67d510746ce3c30ac
Mario Đanić 8 months ago
parent
commit
78c38b6046
  1. 5
      Dockerfile

5
Dockerfile

@ -7,8 +7,9 @@ RUN apt-get update && \
ENV BUILDTAGS include_oss include_gcs
WORKDIR /app/build
ARG REGISTRY_VERSION=2.7.1
RUN git clone https://github.com/docker/distribution.git . && git checkout v$REGISTRY_VERSION
ARG REGISTRY_VERSION="v2.7.1"
RUN curl -L "https://github.com/docker/distribution/archive/${REGISTRY_VERSION}.tar.gz" \
| tar -xz --strip-components=1 -C /app/build
RUN go get .
RUN CGO_ENABLED=0 make PREFIX=/go binaries && file ./bin/registry | grep "statically linked" && chmod +x ./bin/registry
RUN mkdir -p /app/code && cp ./bin/registry /app/code/

Loading…
Cancel
Save