-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(base): change base to SeaweedFS (#1)
- Loading branch information
Showing
5 changed files
with
68 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
FROM docker.io/minio/minio:RELEASE.2023-12-14T18-51-57Z | ||
ARG builder_version=8.9 | ||
ARG runner_version=8.9 | ||
|
||
ENV MINIO_USER minio | ||
ENV MINIO_UID_GID 5001 | ||
FROM registry.access.redhat.com/ubi8/ubi:${builder_version} AS builder | ||
ARG ref=master | ||
RUN dnf install -y go git make gettext \ | ||
&& pushd /root \ | ||
&& git clone --depth 1 --branch $ref https://github.com/seaweedfs/seaweedfs \ | ||
&& pushd seaweedfs/weed \ | ||
&& make install \ | ||
&& popd \ | ||
&& popd | ||
|
||
RUN echo "${MINIO_USER}:x:${MINIO_UID_GID}:${MINIO_UID_GID}:${MINIO_USER}:/home/${MINIO_USER}:/sbin/nologin" >> /etc/passwd && \ | ||
echo "${MINIO_USER}:x:${MINIO_UID_GID}:" >> /etc/group && \ | ||
mkdir "/home/${MINIO_USER}" | ||
|
||
USER 5001 | ||
FROM registry.access.redhat.com/ubi8/ubi-micro:${runner_version} | ||
COPY --from=builder /usr/bin/envsubst /root/go/bin/weed /root/seaweedfs/docker/entrypoint.sh /usr/bin/ | ||
COPY ./cryostat-entrypoint.bash /usr/bin/ | ||
COPY seaweed_conf.template.json /etc/seaweed_conf.template.json | ||
ENTRYPOINT ["/usr/bin/cryostat-entrypoint.bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ -z "${CRYOSTAT_ACCESS_KEY}" ]; then | ||
echo 'CRYOSTAT_ACCESS_KEY must be set and non-empty' | ||
exit 1 | ||
fi | ||
|
||
if [ -z "${CRYOSTAT_SECRET_KEY}" ]; then | ||
echo 'CRYOSTAT_SECRET_KEY must be set and non-empty' | ||
exit 2 | ||
fi | ||
|
||
set -xe | ||
|
||
cfg="$(mktemp)" | ||
envsubst '$CRYOSTAT_ACCESS_KEY $CRYOSTAT_SECRET_KEY' < /etc/seaweed_conf.template.json > "${cfg}" | ||
|
||
exec /usr/bin/entrypoint.sh \ | ||
server -dir="${DATA_DIR:-/tmp}" \ | ||
-s3 -s3.config="${cfg}" \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"identities": [ | ||
{ | ||
"name": "anonymous", | ||
"actions": [ | ||
"Read" | ||
] | ||
}, | ||
{ | ||
"name": "cryostat", | ||
"credentials": [ | ||
{ | ||
"accessKey": "$CRYOSTAT_ACCESS_KEY", | ||
"secretKey": "$CRYOSTAT_SECRET_KEY" | ||
} | ||
], | ||
"actions": [ | ||
"Admin", | ||
"Read", | ||
"ReadAcp", | ||
"List", | ||
"Tagging", | ||
"Write", | ||
"WriteAcp" | ||
] | ||
} | ||
] | ||
} |