Skip to content

Commit

Permalink
Re-add entrypoint for local usage of images (#403)
Browse files Browse the repository at this point in the history
* Re-add entrypoint for local usage of images

* Remove -l in entrypoint
  • Loading branch information
KSerrania authored Sep 1, 2023
1 parent 1c4400b commit 8b00741
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 17 deletions.
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"]

0 comments on commit 8b00741

Please sign in to comment.