Build MinIO server and mc images from upstream source release tags
This commit is contained in:
Executable
+15
@@ -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 "$@"
|
||||
Reference in New Issue
Block a user