forked from DataDog/datadog-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove PYTHON_VERSION from Docker image building (DataDog#31483)
- Loading branch information
Showing
3 changed files
with
10 additions
and
46 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 |
---|---|---|
|
@@ -39,7 +39,6 @@ RUN gcc -pipe -Wall -Wextra -O2 -shared -fPIC -Wl,--version-script=/tmp/nosys.sy | |
FROM baseimage AS extract | ||
ARG TARGETARCH | ||
ARG WITH_JMX | ||
ARG PYTHON_VERSION | ||
ARG DD_AGENT_ARTIFACT=datadog-agent*-$TARGETARCH.tar.xz | ||
ARG GENERAL_ARTIFACTS_CACHE_BUCKET_URL | ||
|
||
|
@@ -75,25 +74,6 @@ RUN find / -maxdepth 1 -name "${DD_AGENT_ARTIFACT}" -exec tar xvf {} -C . \; \ | |
opt/datadog-agent/embedded/share/man \ | ||
# self-test certificates that are detected (false positive) as private keys | ||
opt/datadog-agent/embedded/lib/python*/site-packages/future/backports/test \ | ||
&& if [ "$PYTHON_VERSION" = "2" ]; then \ | ||
rm -rf \ | ||
opt/datadog-agent/embedded/bin/2to3-3* \ | ||
opt/datadog-agent/embedded/bin/easy_install-3* \ | ||
opt/datadog-agent/embedded/bin/idle* \ | ||
opt/datadog-agent/embedded/bin/pip3* \ | ||
opt/datadog-agent/embedded/bin/pydoc* \ | ||
opt/datadog-agent/embedded/bin/python3* \ | ||
opt/datadog-agent/embedded/bin/pyvenv* \ | ||
opt/datadog-agent/embedded/include/python3* \ | ||
opt/datadog-agent/embedded/lib/*python3* || true ;\ | ||
fi \ | ||
&& if [ "$PYTHON_VERSION" = "3" ]; then \ | ||
rm -rf \ | ||
opt/datadog-agent/embedded/bin/pip2* \ | ||
opt/datadog-agent/embedded/bin/python2* \ | ||
opt/datadog-agent/embedded/include/python2* \ | ||
opt/datadog-agent/embedded/lib/*python2* || true ;\ | ||
fi \ | ||
&& find opt/datadog-agent/ -iname "*.a" -delete \ | ||
&& if [ -z "$WITH_JMX" ]; then rm -rf opt/datadog-agent/bin/agent/dist/jmx; fi \ | ||
&& mkdir conf.d checks.d | ||
|
@@ -116,11 +96,9 @@ RUN if [ -n "$WITH_JMX" ]; then cd /opt/bouncycastle-fips && mvn dependency:copy | |
FROM baseimage AS release | ||
LABEL maintainer="Datadog <[email protected]>" | ||
ARG WITH_JMX | ||
ARG PYTHON_VERSION | ||
ARG DD_GIT_REPOSITORY_URL | ||
ARG DD_GIT_COMMIT_SHA | ||
ENV DOCKER_DD_AGENT=true \ | ||
DD_PYTHON_VERSION=$PYTHON_VERSION \ | ||
PATH=/opt/datadog-agent/bin/agent/:/opt/datadog-agent/embedded/bin/:$PATH \ | ||
CURL_CA_BUNDLE=/opt/datadog-agent/embedded/ssl/certs/cacert.pem \ | ||
# Pass envvar variables to agents | ||
|
@@ -202,13 +180,6 @@ RUN tar xzf s6.tgz -C / --exclude="./bin" \ | |
# * https://datadoghq.atlassian.net/wiki/spaces/TS/pages/2615709591/Why+the+containerized+Agent+runs+as+root#Agent-user | ||
RUN [ "$(getent passwd dd-agent | cut -d: -f 3)" -eq 100 ] | ||
|
||
# Update links to python binaries | ||
RUN if [ -n "$PYTHON_VERSION" ]; then \ | ||
ln -sfn /opt/datadog-agent/embedded/bin/python${PYTHON_VERSION} /opt/datadog-agent/embedded/bin/python \ | ||
&& ln -sfn /opt/datadog-agent/embedded/bin/python${PYTHON_VERSION}-config /opt/datadog-agent/embedded/bin/python-config \ | ||
&& ln -sfn /opt/datadog-agent/embedded/bin/pip${PYTHON_VERSION} /opt/datadog-agent/embedded/bin/pip ; \ | ||
fi | ||
|
||
# Override the exit script by ours to fix --pid=host operations | ||
RUN mv /etc/s6/init/init-stage3 /etc/s6/init/init-stage3-original | ||
COPY init-stage3 /etc/s6/init/init-stage3 | ||
|
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