File tree Expand file tree Collapse file tree 2 files changed +18
-5
lines changed
Expand file tree Collapse file tree 2 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,21 @@ make_path_absolute() {
5353 ) /$( basename " $1 " ) "
5454}
5555
56+ # Make us of Docker or apple/container seamless
57+ docker_build () {
58+ docker buildx build " ${@ } "
59+ }
60+
61+ if command -v container > /dev/null 2>&1 ; then
62+ docker () {
63+ container " ${@ } "
64+ }
65+
66+ docker_build () {
67+ container build " ${@ } "
68+ }
69+ fi
70+
5671../trace_forwarder/scripts/build_linux_go_bin.sh
5772
5873docker_build_zip () {
@@ -64,7 +79,7 @@ docker_build_zip() {
6479 # between different python runtimes.
6580 temp_dir=$( mktemp -d)
6681
67- docker buildx build --platform linux/arm64 --file " ${DIR} /Dockerfile_bundle" -t " datadog-bundle:$1 " .. --no-cache --build-arg " runtime=${PYTHON_VERSION} "
82+ docker_build --platform linux/arm64 --file " ${DIR} /Dockerfile_bundle" -t " datadog-bundle:$1 " .. --no-cache --build-arg " runtime=${PYTHON_VERSION} "
6883
6984 # Run the image by runtime tag, tar its generated `python` directory to sdout,
7085 # then extract it to a temp directory.
Original file line number Diff line number Diff line change @@ -17,10 +17,8 @@ rm -rf ./bin
1717# between different python runtimes.
1818
1919if [[ $( docker image ls | grep -c golang) -lt 1 ]]; then
20- docker buildx build --platform linux/arm64 -t golang . --no-cache --build-arg " runtime=python:3.13"
20+ docker_build --platform linux/arm64 -t golang . --no-cache --build-arg " runtime=python:3.13"
2121fi
2222
23- id=$( docker create --platform linux/arm64 golang)
24- docker cp " ${id} :/go/src/github.com/DataDog/datadog-serverless-functions/aws/logs_monitoring/trace_forwarder/bin" .
25- docker rm -v " ${id} "
23+ docker run --rm --platform linux/arm64 --volume " $( pwd) :/root/bin" golang cp -r /go/src/github.com/DataDog/datadog-serverless-functions/aws/logs_monitoring/trace_forwarder/bin /root/bin
2624echo " Done creating archive bin"
You can’t perform that action at this time.
0 commit comments