Skip to content

Commit 977a6b1

Browse files
committed
chore(imagebuilder): use rclone replace mc
1 parent defafc2 commit 977a6b1

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

rootfs/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
ARG CODENAME
22
FROM registry.drycc.cc/drycc/base:${CODENAME}
33

4-
ENV DRYCC_UID=1001 \
4+
ARG DRYCC_UID=1001 \
55
DRYCC_GID=1001 \
66
DRYCC_HOME_DIR=/home/drycc \
77
JQ_VERSION="1.7.1" \
88
YQ_VERSION="4.47.2" \
99
PODMAN_VERSION="5.6.1" \
10-
MC_VERSION="2025.08.13.08.35.41" \
10+
RCLONE_VERSION="1.71.1" \
1111
CADDY_VERSION="2.10.2" \
1212
PACK_VERSION="0.38.2" \
1313
GOSU_VERSION="1.18"
@@ -21,7 +21,7 @@ RUN install-packages procps psmisc \
2121
&& install-stack jq $JQ_VERSION \
2222
&& install-stack yq $YQ_VERSION \
2323
&& install-stack podman $PODMAN_VERSION \
24-
&& install-stack mc $MC_VERSION \
24+
&& install-stack rclone $RCLONE_VERSION \
2525
&& install-stack caddy $CADDY_VERSION \
2626
&& install-stack pack $PACK_VERSION \
2727
&& install-stack gosu $GOSU_VERSION \

rootfs/usr/local/bin/get_object

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
#!/usr/bin/env bash
22

3-
mc alias set storage \
4-
"${DRYCC_STORAGE_ENDPOINT}" \
5-
"${DRYCC_STORAGE_ACCESSKEY}" \
6-
"${DRYCC_STORAGE_SECRETKEY}" \
7-
--path "${DRYCC_STORAGE_PATH_STYLE}"
3+
mkdir -p ~/.config/rclone
4+
touch ~/.config/rclone/rclone.conf
5+
rclone config create storage s3 \
6+
provider=Other \
7+
access_key_id="${DRYCC_STORAGE_ACCESSKEY}" \
8+
secret_access_key="${DRYCC_STORAGE_SECRETKEY}" \
9+
endpoint="${DRYCC_STORAGE_ENDPOINT}" \
10+
force_path_style="${DRYCC_STORAGE_PATH_STYLE:-true}" --no-output
811

912
GET_PATH=/tmp/app.tgz
1013

11-
mc ping storage -x
12-
if ! mc admin info storage > /dev/null 2>&1; then
14+
if ! rclone lsd storage: > /dev/null 2>&1; then
1315
sleep 9s
14-
else
15-
mc ready storage
16+
echo "waiting for object storage to become ready..."
1617
fi
17-
mc cp storage/"${DRYCC_STORAGE_BUCKET}/${TAR_PATH}" "${GET_PATH}"
18+
rclone copyto storage:"${DRYCC_STORAGE_BUCKET}/${TAR_PATH}" "${GET_PATH}"

0 commit comments

Comments
 (0)