Skip to content
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

Re-add entrypoint for local usage of images #403

Merged
merged 2 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deb-arm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,9 @@ RUN if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then set -ex \

# Force umask to 0022
RUN echo "umask 0022" >> /root/.bashrc

# Entrypoint - only for local usage, Kubernetes-based Gitlab runners overwrite this
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
6 changes: 6 additions & 0 deletions deb-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,9 @@ RUN mkdir -p /go/src/github.com/DataDog/datadog-agent

# Force umask to 0022
RUN echo "umask 0022" >> /root/.bashrc

# Entrypoint - only for local usage, Kubernetes-based Gitlab runners overwrite this
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
18 changes: 1 addition & 17 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
#!/bin/bash -l
#!/bin/bash
set -e

source /root/.bashrc

if command -v conda; then
# Only try to use conda if it's installed.
# On ARM32 images, we use the system Python 3 because conda is not supported.
conda activate ddpy3
fi

if [ "$DD_TARGET_ARCH" = "aarch64" ] ; then
export GIMME_ARCH=arm64
elif [ "$DD_TARGET_ARCH" = "armhf" ] ; then
export GIMME_ARCH=arm
fi

if [ -n "$GIMME_GO_VERSION" ] ; then
eval "$(gimme)"
fi

exec "$@"
6 changes: 6 additions & 0 deletions rpm-arm64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ RUN chmod +x /build-gcc.sh \

# Force umask to 0022
RUN echo "umask 0022" >> /root/.bashrc

# Entrypoint - only for local usage, Kubernetes-based Gitlab runners overwrite this
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
6 changes: 6 additions & 0 deletions rpm-armhf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,9 @@ ENV PATH="${GOPATH}/bin:${PATH}"

# Force umask to 0022
RUN echo "umask 0022" >> /root/.bashrc

# Entrypoint - only for local usage, Kubernetes-based Gitlab runners overwrite this
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
6 changes: 6 additions & 0 deletions rpm-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,9 @@ RUN chmod +x /build-gcc.sh \

# Force umask to 0022
RUN echo "umask 0022" >> /root/.bashrc

# Entrypoint - only for local usage, Kubernetes-based Gitlab runners overwrite this
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
6 changes: 6 additions & 0 deletions suse-x64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,9 @@ RUN mkdir -p /usr/local/var/lib/rpm \

# Force umask to 0022
RUN echo "umask 0022" >> /root/.bashrc

# Entrypoint - only for local usage, Kubernetes-based Gitlab runners overwrite this
COPY ./entrypoint.sh /
RUN chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]