Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ ARG runtime
RUN mkdir -p /build/python/lib/$runtime/site-packages
WORKDIR /build

# Install GCC
RUN set -eux; \
if command -v dnf >/dev/null 2>&1; then \
dnf -y install git gcc-c++; \
else \
yum -y install git gcc10 gcc10-c++; \
ln -s /usr/bin/gcc10-gcc /usr/bin/gcc; \
ln -s /usr/bin/gcc10-g++ /usr/bin/g++; \
ln -s /usr/bin/gcc10-cc /usr/bin/cc; \
fi

# Add Rust compiler which is needed to build dd-trace-py from source
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ function docker_build_zip {
# between different python runtimes.
temp_dir=$(mktemp -d)
docker buildx build -t datadog-lambda-python-${arch}:$1 . --no-cache \
--build-arg image=public.ecr.aws/docker/library/python:$1 \
--build-arg image=public.ecr.aws/lambda/python:$1 \
--build-arg runtime=python$1 \
--platform linux/${arch} \
--progress=plain \
Expand Down
Loading