Skip to content

use docker-cp when building layers #366

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

Merged
merged 1 commit into from
Aug 31, 2023
Merged
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: 3 additions & 3 deletions scripts/build_layers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ function docker_build_zip {
--platform linux/${arch} \
--load

# Run the image by runtime tag, tar its generatd `python` directory to sdout,
# then extract it to a temp directory.
docker run datadog-lambda-python-${arch}:$1 tar cf - python | tar -xf - -C $temp_dir
# Run the image by runtime tag and copy the output /build/python to the temp dir
dockerId=$(docker create datadog-lambda-python-${arch}:$1)
docker cp $dockerId:/build/python $temp_dir/python


# Zip to destination, and keep directory structure as based in $temp_dir
Expand Down