-
-
Notifications
You must be signed in to change notification settings - Fork 7
Various update: log4shell removal, testing-tools uid/gid #1192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -10,6 +10,9 @@ FROM python:3.12-slim-bullseye@sha256:229b2897e6b5c630d83a721e42dd1c96e3ec996323 | |||||||||||||||||||||
ARG PRODUCT | ||||||||||||||||||||||
ARG RELEASE | ||||||||||||||||||||||
ARG KEYCLOAK_VERSION | ||||||||||||||||||||||
ARG STACKABLE_USER_UID | ||||||||||||||||||||||
ARG STACKABLE_USER_GID | ||||||||||||||||||||||
ARG STACKABLE_USER_NAME | ||||||||||||||||||||||
|
||||||||||||||||||||||
LABEL name="Stackable Testing Tools" \ | ||||||||||||||||||||||
maintainer="info@stackable.tech" \ | ||||||||||||||||||||||
|
@@ -25,49 +28,55 @@ SHELL ["/bin/bash", "-euo", "pipefail", "-c"] | |||||||||||||||||||||
# This is needed so that krb5-user installs without prompting for a realm. | ||||||||||||||||||||||
ENV DEBIAN_FRONTEND=noninteractive | ||||||||||||||||||||||
|
||||||||||||||||||||||
# krb5-user/libkrb5-dev are needed for Kerberos support. | ||||||||||||||||||||||
RUN apt-get update && \ | ||||||||||||||||||||||
apt-get install -y --no-install-recommends \ | ||||||||||||||||||||||
build-essential \ | ||||||||||||||||||||||
ca-certificates \ | ||||||||||||||||||||||
curl \ | ||||||||||||||||||||||
gzip \ | ||||||||||||||||||||||
jq \ | ||||||||||||||||||||||
krb5-user \ | ||||||||||||||||||||||
kubernetes-client \ | ||||||||||||||||||||||
libkrb5-dev \ | ||||||||||||||||||||||
libssl-dev \ | ||||||||||||||||||||||
libxml2-dev \ | ||||||||||||||||||||||
libxslt1-dev \ | ||||||||||||||||||||||
pkg-config \ | ||||||||||||||||||||||
python3-certifi \ | ||||||||||||||||||||||
python3-idna \ | ||||||||||||||||||||||
python3-semver \ | ||||||||||||||||||||||
python3-thrift \ | ||||||||||||||||||||||
python3-toml \ | ||||||||||||||||||||||
python3-urllib3 \ | ||||||||||||||||||||||
tar \ | ||||||||||||||||||||||
zip \ | ||||||||||||||||||||||
unzip \ | ||||||||||||||||||||||
# Java 11 seems like the best middle-ground for all tools | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I still dislike us commenting like 20 lines above and prefer keeping the comments at the line where they apply. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's not possible with the EOF/heredoc style unfortunately. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use a trick in other places, such as docker-images/trino/trino/Dockerfile Lines 46 to 55 in e93d8f3
The following diff works: diff --git a/testing-tools/Dockerfile b/testing-tools/Dockerfile
index 06e10f0..898404f 100644
--- a/testing-tools/Dockerfile
+++ b/testing-tools/Dockerfile
@@ -33,7 +33,6 @@ COPY testing-tools/python /stackable/python
COPY testing-tools/licenses /licenses
# krb5-user/libkrb5-dev are needed for Kerberos support.
-# Java 11 seems like the best middle-ground for all tools
RUN <<EOF
apt-get update
apt-get install -y --no-install-recommends \
@@ -42,8 +41,10 @@ apt-get install -y --no-install-recommends \
curl \
gzip \
jq \
+ `# Needed for Kerberos support` \
krb5-user \
kubernetes-client \
+ `# Needed for Kerberos support` \
libkrb5-dev \
libssl-dev \
libxml2-dev \
@@ -58,6 +59,7 @@ apt-get install -y --no-install-recommends \
tar \
zip \
unzip \
+ `# Java 11 seems like the best middle-ground for all tools` \
openjdk-11-jdk-headless
apt-get clean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not know that syntax, thanks., |
||||||||||||||||||||||
openjdk-11-jdk-headless && \ | ||||||||||||||||||||||
apt-get clean && \ | ||||||||||||||||||||||
rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||
|
||||||||||||||||||||||
COPY testing-tools/python /stackable/python | ||||||||||||||||||||||
COPY testing-tools/licenses /licenses | ||||||||||||||||||||||
|
||||||||||||||||||||||
ENV PATH=/stackable/keycloak/bin:$PATH | ||||||||||||||||||||||
RUN curl --fail -L https://repo.stackable.tech/repository/packages/keycloak/keycloak-${KEYCLOAK_VERSION}.tar.gz | tar -xzC /stackable && \ | ||||||||||||||||||||||
ln -s /stackable/keycloak-${KEYCLOAK_VERSION} /stackable/keycloak | ||||||||||||||||||||||
|
||||||||||||||||||||||
RUN pip install --no-cache-dir --upgrade pip && \ | ||||||||||||||||||||||
pip install --no-cache-dir -r /stackable/python/requirements.txt && \ | ||||||||||||||||||||||
groupadd -r stackable --gid=1000 && \ | ||||||||||||||||||||||
useradd -r -g stackable --uid=1000 stackable && \ | ||||||||||||||||||||||
chown -R stackable:stackable /stackable | ||||||||||||||||||||||
RUN <<EOF | ||||||||||||||||||||||
apt-get update | ||||||||||||||||||||||
apt-get install -y --no-install-recommends \ | ||||||||||||||||||||||
build-essential \ | ||||||||||||||||||||||
ca-certificates \ | ||||||||||||||||||||||
curl \ | ||||||||||||||||||||||
gzip \ | ||||||||||||||||||||||
jq \ | ||||||||||||||||||||||
`# krb5-user/libkrb5-dev are needed for Kerberos support. ` \ | ||||||||||||||||||||||
krb5-user \ | ||||||||||||||||||||||
libkrb5-dev \ | ||||||||||||||||||||||
kubernetes-client \ | ||||||||||||||||||||||
libssl-dev \ | ||||||||||||||||||||||
libxml2-dev \ | ||||||||||||||||||||||
libxslt1-dev \ | ||||||||||||||||||||||
pkg-config \ | ||||||||||||||||||||||
python3-certifi \ | ||||||||||||||||||||||
python3-idna \ | ||||||||||||||||||||||
python3-semver \ | ||||||||||||||||||||||
python3-thrift \ | ||||||||||||||||||||||
python3-toml \ | ||||||||||||||||||||||
python3-urllib3 \ | ||||||||||||||||||||||
tar \ | ||||||||||||||||||||||
zip \ | ||||||||||||||||||||||
unzip \ | ||||||||||||||||||||||
`# Java 11 seems like the best middle-ground for all tools` \ | ||||||||||||||||||||||
openjdk-11-jdk-headless | ||||||||||||||||||||||
|
||||||||||||||||||||||
apt-get clean | ||||||||||||||||||||||
rm -rf /var/lib/apt/lists/* | ||||||||||||||||||||||
|
||||||||||||||||||||||
curl --fail -L https://repo.stackable.tech/repository/packages/keycloak/keycloak-${KEYCLOAK_VERSION}.tar.gz | tar -xzC /stackable | ||||||||||||||||||||||
ln -s /stackable/keycloak-${KEYCLOAK_VERSION} /stackable/keycloak | ||||||||||||||||||||||
|
||||||||||||||||||||||
pip install --no-cache-dir --upgrade pip | ||||||||||||||||||||||
pip install --no-cache-dir -r /stackable/python/requirements.txt | ||||||||||||||||||||||
groupadd -r ${STACKABLE_USER_NAME} --gid=${STACKABLE_USER_GID} | ||||||||||||||||||||||
useradd -r -g ${STACKABLE_USER_NAME} --uid=${STACKABLE_USER_UID} ${STACKABLE_USER_NAME} | ||||||||||||||||||||||
chown -R ${STACKABLE_USER_UID}:0 /stackable | ||||||||||||||||||||||
EOF | ||||||||||||||||||||||
|
||||||||||||||||||||||
ENV PATH=/stackable/keycloak/bin:$PATH | ||||||||||||||||||||||
|
||||||||||||||||||||||
USER stackable | ||||||||||||||||||||||
USER ${STACKABLE_USER_UID} | ||||||||||||||||||||||
|
||||||||||||||||||||||
ENV STACKABLE_PRODUCT_VERSION=${PRODUCT} | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff looks like it is now missing a
&&
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'll take a look!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d5ef172
(#1192)