diff --git a/src/commands/docker/extract_node_modules.yml b/src/commands/docker/extract_node_modules.yml new file mode 100644 index 00000000..df7f886b --- /dev/null +++ b/src/commands/docker/extract_node_modules.yml @@ -0,0 +1,19 @@ +parameters: + image_repo: + description: The container image repository + type: string + platform: + description: Platform to build against + type: enum + default: "linux/amd64" + enum: ["linux/amd64", "linux/arm64"] + node_version: + description: Node version + type: string +steps: + - staged_buildx: + image_repo: << parameters.image_repo >> + target: node_modules + platforms: << parameters.platform >> + output: type=local,dest=./node_modules + extra_build_args: NODE_VERSION=<< parameters.node_version >> diff --git a/src/scripts/yarn/create_lock.sh b/src/scripts/yarn/create_lock.sh index 09421381..55c3b9e8 100644 --- a/src/scripts/yarn/create_lock.sh +++ b/src/scripts/yarn/create_lock.sh @@ -3,8 +3,8 @@ # Create the folder if not exists [ ! -d /tmp/lock ] && mkdir -p /tmp/lock -LOCK_FILE="/tmp/lock/$(uuidgen)" +LOCK_FILE="$(mktemp -t -p /tmp/lock)" touch "$LOCK_FILE" echo "Lock created at $LOCK_FILE" -echo "export LOCK_FILE=$LOCK_FILE" >> "$BASH_ENV" +echo "export LOCK_FILE=$LOCK_FILE" >>"$BASH_ENV"