-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
69 lines (59 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
###########################################################################################################
#
# How to build:
#
# docker build -t arkcase/minio:.... .
#
# How to run: (Docker)
# docker compose -f docker-compose.yml up -d
#
#
###########################################################################################################
ARG PUBLIC_REGISTRY="public.ecr.aws"
ARG ARCH="amd64"
ARG OS="linux"
ARG VER="20240803043323.0.0"
ARG MINIO_VER="${VER}"
ARG MINIO_RPM_VER="${MINIO_VER}-1"
ARG MC_VER="20240731155833.0.0"
ARG MC_RPM_VER="${MC_VER}-1"
ARG MINIO_SRC="https://dl.min.io/server/minio/release/linux-amd64/archive/minio-${MINIO_RPM_VER}.x86_64.rpm"
ARG MC_SRC="https://dl.min.io/client/mc/release/linux-amd64/archive/mcli-${MC_RPM_VER}.x86_64.rpm"
ARG APP_USER="minio"
ARG APP_UID="33000"
ARG APP_GROUP="${APP_USER}"
ARG APP_GID="1000"
ARG BASE_REGISTRY="${PUBLIC_REGISTRY}"
ARG BASE_REPO="arkcase/base"
ARG BASE_VER="8"
ARG BASE_VER_PFX=""
ARG BASE_IMG="${BASE_REGISTRY}/${BASE_REPO}:${BASE_VER_PFX}${BASE_VER}"
# Final Image
FROM "${BASE_IMG}"
ARG ARCH
ARG OS
ARG VER
ARG MINIO_SRC
ARG MC_SRC
ARG APP_USER
ARG APP_UID
ARG APP_GROUP
ARG APP_GID
LABEL ORG="ArkCase LLC" \
MAINTAINER="Armedia Devops Team <[email protected]>" \
APP="MinIO Server" \
VERSION="${VER}"
ENV PATH="/usr/local/bin:${PATH}"
RUN yum -y install \
sudo \
"${MINIO_SRC}" \
"${MC_SRC}" \
&& \
yum -y clean all && \
groupadd -g "${APP_GID}" "${APP_GROUP}" && \
useradd -u "${APP_UID}" -g "${APP_GROUP}" -G "${ACM_GROUP}" "${APP_USER}" && \
chown -R "${APP_UID}:${APP_GID}" "${HOME}"
COPY --chown=root:root entrypoint /
USER "${APP_USER}"
VOLUME [ "/app/data" ]
ENTRYPOINT [ "/entrypoint" ]