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 @@ -11,20 +11,20 @@ RUN export GO111MODULE=on \
1111
1212FROM registry.drycc.cc/drycc/base:${CODENAME}
1313
14- ENV DRYCC_UID=1001 \
14+ ARG DRYCC_UID=1001 \
1515 DRYCC_GID=1001 \
1616 DRYCC_HOME_DIR=/var/lib/registry \
1717 JQ_VERSION="1.7.1" \
18- MC_VERSION="2025.08.13.08.35.41" \
1918 NGINX_VERSION="1.29.1" \
19+ RCLONE_VERSION="1.71.1" \
2020 REGISTRY_VERSION="3.0.0"
2121
2222RUN groupadd drycc --gid ${DRYCC_GID} \
2323 && useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR} \
2424 && install-packages apache2-utils \
2525 && install-stack jq $JQ_VERSION \
26- && install-stack mc $MC_VERSION \
2726 && install-stack nginx ${NGINX_VERSION} \
27+ && install-stack rclone $RCLONE_VERSION \
2828 && install-stack registry $REGISTRY_VERSION \
2929 && rm -rf \
3030 /usr/share/doc \
Original file line number Diff line number Diff line change 6666 name: storage-creds
6767 key: secretkey
6868- name: " DRYCC_STORAGE_PATH_STYLE"
69- value: " on "
69+ value: " true "
7070{{- end }}
7171{{- end }}
Original file line number Diff line number Diff line change @@ -7,9 +7,9 @@ DRYCC_STORAGE_SECRETKEY=f4c4281665bc11ee8e0400163e04a9cd
77
88
99STORAGE_JOB=$( podman run -d --rm --entrypoint init-stack \
10- -e MINIO_ROOT_USER =" ${DRYCC_STORAGE_ACCESSKEY} " \
11- -e MINIO_ROOT_PASSWORD =" ${DRYCC_STORAGE_SECRETKEY} " \
12- " ${DEV_REGISTRY} " /drycc/storage:canary minio server /data)
10+ -e RUSTFS_ACCESS_KEY =" ${DRYCC_STORAGE_ACCESSKEY} " \
11+ -e RUSTFS_SECRET_KEY =" ${DRYCC_STORAGE_SECRETKEY} " \
12+ " ${DEV_REGISTRY} " /drycc/storage:canary rustfs /data)
1313
1414# wait for port
1515STORAGE_IP=$( podman inspect --format " {{ .NetworkSettings.IPAddress }}" " ${STORAGE_JOB} " )
@@ -26,7 +26,7 @@ REGISTRY_JOB=$(podman run -d --rm \
2626 -e DRYCC_STORAGE_ENDPOINT=" http://${STORAGE_IP} :9000" \
2727 -e DRYCC_STORAGE_ACCESSKEY=" ${DRYCC_STORAGE_ACCESSKEY} " \
2828 -e DRYCC_STORAGE_SECRETKEY=" ${DRYCC_STORAGE_SECRETKEY} " \
29- -e DRYCC_STORAGE_PATH_STYLE=on \
29+ -e DRYCC_STORAGE_PATH_STYLE=true \
3030 " $1 " start-registry)
3131
3232# shellcheck disable=SC2317
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ func main() {
4040 os .Setenv ("REGISTRY_STORAGE_S3_SECRETKEY" , os .Getenv (storageSecretkeyEnvVar ))
4141 os .Setenv ("REGISTRY_STORAGE_S3_BUCKET" , os .Getenv (storageBucketEnvVar ))
4242
43- if os .Getenv (storagePathStyleEnvVar ) == "on " {
43+ if os .Getenv (storagePathStyleEnvVar ) == "true " {
4444 os .Setenv ("REGISTRY_STORAGE_S3_FORCEPATHSTYLE" , "true" )
4545 }
4646
Original file line number Diff line number Diff line change 22
33set -e
44
5- mc alias set storage \
6- " ${DRYCC_STORAGE_ENDPOINT} " \
7- " ${DRYCC_STORAGE_ACCESSKEY} " \
8- " ${DRYCC_STORAGE_SECRETKEY} " \
9- --path " ${DRYCC_STORAGE_PATH_STYLE} "
105
11- mc ping storage -x
12- if ! mc admin info storage > /dev/null 2>&1 ; then
6+ mkdir -p ~ /.config/rclone
7+ touch ~ /.config/rclone/rclone.conf
8+ rclone config create storage s3 \
9+ provider=Other \
10+ access_key_id=" ${DRYCC_STORAGE_ACCESSKEY} " \
11+ secret_access_key=" ${DRYCC_STORAGE_SECRETKEY} " \
12+ endpoint=" ${DRYCC_STORAGE_ENDPOINT} " \
13+ force_path_style=" ${DRYCC_STORAGE_PATH_STYLE:- true} " --no-output
14+
15+ if ! rclone lsd storage: > /dev/null 2>&1 ; then
1316 sleep 9s
14- else
15- mc ready storage
17+ echo " waiting for object storage to become ready..."
1618fi
17- mc mb --ignore-existing storage/" ${DRYCC_STORAGE_BUCKET} "
19+
20+ rclone mkdir " storage:${DRYCC_STORAGE_BUCKET} "
1821
1922htpasswd -Bbn " ${DRYCC_REGISTRY_USERNAME} " " ${DRYCC_REGISTRY_PASSWORD} " > " ${REGISTRY_AUTH_HTPASSWD_PATH} "
2023echo " create ${REGISTRY_AUTH_HTPASSWD_PATH} success"
You can’t perform that action at this time.
0 commit comments