Skip to content

Commit 8f2686c

Browse files
authored
use docker-cp when building layers (#366)
1 parent 75d7858 commit 8f2686c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/build_layers.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ function docker_build_zip {
5151
--platform linux/${arch} \
5252
--load
5353

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

5858

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

0 commit comments

Comments
 (0)