File tree Expand file tree Collapse file tree
charts/registry/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,16 +9,16 @@ RUN export GO111MODULE=on \
99
1010FROM docker.io/drycc/base:bullseye
1111
12- RUN adduser --system \
13- --shell /bin/bash \
14- --disabled-password \
15- --home /var/lib/registry \
16- --group \
17- drycc
12+ ARG DRYCC_UID=1001
13+ ARG DRYCC_GID=1001
14+ ARG DRYCC_HOME_DIR=/var/lib/registry
15+
16+ RUN groupadd drycc --gid ${DRYCC_GID} \
17+ && useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
1818
1919COPY rootfs/bin/ /bin/
2020COPY rootfs/config-example.yml /etc/docker/registry/config.yml
21- COPY --from=build /usr/local/bin/registry /opt/registry/sbin /registry
21+ COPY --from=build /usr/local/bin/registry /opt/registry/bin /registry
2222ENV JQ_VERSION="1.6" \
2323 MC_VERSION="2022.02.26.03.58.31" \
2424 REGISTRY_VERSION="2.8.0"
@@ -41,9 +41,9 @@ RUN install-stack jq $JQ_VERSION \
4141 /usr/lib/`echo $(uname -m)`-linux-gnu/gconv/IBM* \
4242 /usr/lib/`echo $(uname -m)`-linux-gnu/gconv/EBC* \
4343 && mkdir -p /usr/share/man/man{1..8} \
44- && chown -R drycc:drycc /var/lib/registry
44+ && chown -R drycc:drycc ${DRYCC_HOME_DIR}
4545
4646USER drycc
47- VOLUME ["/var/lib/registry " ]
48- CMD ["/opt/registry/sbin /registry" ]
47+ VOLUME ["${DRYCC_HOME_DIR} " ]
48+ CMD ["/opt/registry/bin /registry" ]
4949EXPOSE 5000
Original file line number Diff line number Diff line change 2727 - name : drycc-registry-init
2828 image : docker.io/drycc/python-dev:latest
2929 imagePullPolicy : {{.Values.imagePullPolicy}}
30- command :
30+ args :
3131 - netcat
3232 - -v
3333 - -a
7070 mountPath : /var/lib/registry
7171 - name : objectstorage-creds
7272 mountPath : /var/run/secrets/drycc/objectstore/creds
73+ securityContext :
74+ fsGroup : 1001
75+ runAsGroup : 1001
76+ runAsUser : 1001
7377 volumes :
7478 - name : registry-storage
7579 emptyDir : {}
You can’t perform that action at this time.
0 commit comments