Build MinIO server and mc images from upstream source release tags

This commit is contained in:
2026-09-25 16:24:27 +01:00
commit 4acb9368c2
4 changed files with 112 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# Mirrors upstream's entrypoint: bare args (`server /data`) run as `minio server /data`; other binaries
# (sh, mc, curl) run as given; MINIO_USERNAME/GROUPNAME drop privileges the same way.
if [ "${1}" != "minio" ] && [ -n "${1}" ] && ! command -v "${1}" >/dev/null 2>&1; then
set -- minio "$@"
fi
if [ -n "${MINIO_USERNAME}" ] && [ -n "${MINIO_GROUPNAME}" ]; then
if [ -n "${MINIO_UID}" ] && [ -n "${MINIO_GID}" ]; then
exec chroot --userspec="${MINIO_UID}:${MINIO_GID}" / "$@"
fi
echo "${MINIO_USERNAME}:x:1000:1000:${MINIO_USERNAME}:/:/sbin/nologin" >>/etc/passwd
echo "${MINIO_GROUPNAME}:x:1000:" >>/etc/group
exec chroot --userspec="${MINIO_USERNAME}:${MINIO_GROUPNAME}" / "$@"
fi
exec "$@"