File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM docker.io/minio/mc:latest as mc
2-
3-
41FROM docker.io/drycc/go-dev:latest AS build
52ARG LDFLAGS
63ADD . /app
@@ -10,15 +7,43 @@ RUN export GO111MODULE=on \
107 && upx -9 --brute /usr/local/bin/registry
118
129
13- FROM docker.io/library/registry:2.7
10+ FROM docker.io/drycc/base:bullseye
11+
12+ RUN adduser --system \
13+ --shell /bin/bash \
14+ --disabled-password \
15+ --home /var/lib/registry \
16+ --group \
17+ drycc
1418
15- COPY rootfs /
16- COPY --from=mc /usr/bin/mc /bin/mc
19+ COPY rootfs/bin/ /bin /
20+ COPY rootfs/config-example.yml /etc/docker/registry/config.yml
1721COPY --from=build /usr/local/bin/registry /opt/registry/sbin/registry
22+ ENV JQ_VERSION="1.6" \
23+ MC_VERSION="RELEASE.2022-02-26T03-58-31Z" \
24+ REGISTRY_VERSION="2.8.0"
1825
19- RUN apk add --no-cache jq bash \
20- && chmod +x /bin/create_bucket /bin/normalize_storage
26+ RUN install-stack jq $JQ_VERSION \
27+ && install-stack mc $MC_VERSION \
28+ && install-stack registry $REGISTRY_VERSION \
29+ && chmod +x /bin/create_bucket /bin/normalize_storage \
30+ && rm -rf \
31+ /usr/share/doc \
32+ /usr/share/man \
33+ /usr/share/info \
34+ /usr/share/locale \
35+ /var/lib/apt/lists/* \
36+ /var/log/* \
37+ /var/cache/debconf/* \
38+ /etc/systemd \
39+ /lib/lsb \
40+ /lib/udev \
41+ /usr/lib/`echo $(uname -m)`-linux-gnu/gconv/IBM* \
42+ /usr/lib/`echo $(uname -m)`-linux-gnu/gconv/EBC* \
43+ && mkdir -p /usr/share/man/man{1..8} \
44+ && chown -R drycc:drycc /var/lib/registry
2145
46+ USER drycc
2247VOLUME ["/var/lib/registry" ]
2348CMD ["/opt/registry/sbin/registry" ]
2449EXPOSE 5000
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ echo "1234567890123456789012345678901234567890" > "${CURRENT_DIR}"/tmp/aws-user/
1212
1313MINIO_JOB=$( docker run -d --name minio \
1414 -v " ${CURRENT_DIR} " /tmp/aws-user:/var/run/secrets/drycc/objectstore/creds \
15- drycc/minio:canary server /home /minio/)
15+ drycc/minio:canary server /data /minio/)
1616
1717sleep 5
1818docker logs " ${MINIO_JOB} "
Original file line number Diff line number Diff line change 99)
1010
1111const (
12- registryBinary = "/bin/registry"
12+ registryBinary = "/opt/drycc/registry/ bin/registry"
1313 registryConfig = "/etc/docker/registry/config.yml"
1414 minioHostEnvVar = "DRYCC_MINIO_SERVICE_HOST"
1515 minioPortEnvVar = "DRYCC_MINIO_SERVICE_PORT"
Original file line number Diff line number Diff line change 1+ version : 0.1
2+ log :
3+ fields :
4+ service : registry
5+ storage :
6+ cache :
7+ blobdescriptor : inmemory
8+ filesystem :
9+ rootdirectory : /var/lib/registry
10+ http :
11+ addr : :5000
12+ headers :
13+ X-Content-Type-Options : [nosniff]
14+ health :
15+ storagedriver :
16+ enabled : true
17+ interval : 10s
18+ threshold : 3
You can’t perform that action at this time.
0 commit comments