Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions .gitlab/scripts/Dockerfile.build_layer
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ ARG DATADOG_WRAPPER=datadog_wrapper
ARG SUFFIX

RUN apt-get update
RUN apt-get install -y zip binutils upx
RUN apt-get install -y zip binutils

COPY .binaries/datadog-agent-$SUFFIX /datadog-agent-go
RUN strip /datadog-agent-go
RUN upx -1 /datadog-agent-go
RUN if [ "$PLATFORM" = "x86_64" ]; then apt-get install -y upx && upx -1 /datadog-agent-go; fi

RUN mkdir /extensions
WORKDIR /extensions
Expand Down
8 changes: 8 additions & 0 deletions .gitlab/scripts/Dockerfile.go_agent.alpine.compile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did we measure the cold start for alpine images?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh good q

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self monitoring seems to have the expected slightly above value

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ RUN /usr/lib/go/bin/go tool nm datadog-agent | grep -w 'github.com/DataDog/datad
(echo "agentVersionDefault variable doesn't exist" && exit 1)

RUN strip datadog-agent
RUN arch="$(uname -m)"; \
if [ "${arch}" = 'aarch64' ]; then \
arch='arm64'; \
fi; \
if [ "${arch}" = 'x86_64' ]; then \
arch='amd64'; \
fi; \
apt-get install -y upx && upx -1 /datadog-agent-go;

# keep the smallest possible docker image
FROM scratch
Expand Down
1 change: 1 addition & 0 deletions .gitlab/scripts/Dockerfile.go_agent.compile
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ RUN /usr/local/go/bin/go tool nm datadog-agent | grep -w 'github.com/DataDog/dat
(echo "agentVersionDefault variable doesn't exist" && exit 1)

RUN strip datadog-agent
RUN if [ "$arch" = "x86_64" ]; then apt-get install -y upx && upx -1 /datadog-agent-go; fi

# keep the smallest possible docker imag
FROM scratch
Expand Down
4 changes: 2 additions & 2 deletions scripts/Dockerfile.bottlecap.alpine.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ ARG DATADOG_WRAPPER=datadog_wrapper
ARG GO_AGENT_PATH

RUN apt-get update
RUN apt-get install -y zip binutils upx
RUN apt-get install -y zip binutils

COPY .layers/$GO_AGENT_PATH/extensions/datadog-agent /datadog-agent-go
RUN strip /datadog-agent-go
RUN upx -1 /datadog-agent-go
RUN if [ "$PLATFORM" = "x86_64" ]; then apt-get install -y upx && upx -1 /datadog-agent-go; fi


RUN mkdir /extensions
Expand Down
4 changes: 2 additions & 2 deletions scripts/Dockerfile.bottlecap.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ ARG DATADOG_WRAPPER=datadog_wrapper
ARG GO_AGENT_PATH

RUN apt-get update
RUN apt-get install -y zip binutils upx
RUN apt-get install -y zip binutils
COPY .layers/$GO_AGENT_PATH/extensions/datadog-agent /datadog-agent-go
RUN strip /datadog-agent-go
RUN upx -1 /datadog-agent-go
RUN if [ "$PLATFORM" = "x86_64" ]; then apt-get install -y upx && upx -1 /datadog-agent-go; fi


RUN mkdir /extensions
Expand Down
6 changes: 2 additions & 4 deletions scripts/Dockerfile.bottlecap.dev
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,9 @@ FROM ubuntu:22.04 as compresser
ARG DATADOG_WRAPPER=datadog_wrapper

RUN apt-get update
RUN apt-get install -y zip binutils upx
RUN apt-get install -y zip binutils
COPY --from=public.ecr.aws/datadog/lambda-extension:64 /opt/datadog-agent-go /datadog-agent-go
RUN du -h /datadog-agent-go
RUN upx -1 /datadog-agent-go
RUN du -h /datadog-agent-go
RUN if [ "$PLATFORM" = "x86_64" ]; then apt-get install -y upx && upx -1 /datadog-agent-go; fi
RUN mkdir /extensions
WORKDIR /extensions

Expand Down
Loading