-
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (39 loc) · 1.6 KB
/
Dockerfile
File metadata and controls
50 lines (39 loc) · 1.6 KB
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
# syntax=docker/dockerfile:1.20.0@sha256:26147acbda4f14c5add9946e2fd2ed543fc402884fd75146bd342a7f6271dc1d
# check=error=true
FROM local-image/java-base
ARG PRODUCT_VERSION
ARG RELEASE_VERSION
ARG STACKABLE_USER_UID
LABEL name="Trino CLI" \
maintainer="info@stackable.tech" \
vendor="Stackable GmbH" \
version="${PRODUCT_VERSION}" \
release="${RELEASE_VERSION}" \
summary="The Stackable image for the Trino CLI." \
description="This image can be used to interact with Stackable Trino deployments."
RUN microdnf update && \
microdnf install \
gzip \
tar \
zip && \
microdnf clean all && \
rm -rf /var/cache/yum
COPY --chown=${STACKABLE_USER_UID}:0 trino-cli/licenses /licenses
WORKDIR /stackable/trino-cli
RUN <<EOF
curl -O "https://repo.stackable.tech/repository/packages/trino-cli/trino-cli-${PRODUCT_VERSION}"
chmod +x "trino-cli-${PRODUCT_VERSION}"
ln -s "trino-cli-${PRODUCT_VERSION}" trino-cli
# All files and folders owned by root group to support running as arbitrary users.
# This is best practice as all container users will belong to the root group (0).
chown -R ${STACKABLE_USER_UID}:0 /stackable
chmod -R g=u /stackable
EOF
# ----------------------------------------
# Attention: We are changing the group of all files in /stackable directly above
# If you do any file based actions (copying / creating etc.) below this comment you
# absolutely need to make sure that the correct permissions are applied!
# chown ${STACKABLE_USER_UID}:0
# ----------------------------------------
USER ${STACKABLE_USER_UID}
ENTRYPOINT ["/stackable/trino-cli/trino-cli"]