-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed build only script and add support for build arguments
- Loading branch information
Matteo Pietro Dazzi
committed
Feb 16, 2020
1 parent
7e1f9c9
commit c85b5f0
Showing
5 changed files
with
26 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
#!/bin/sh -l | ||
export DOCKER_CLI_EXPERIMENTAL=enabled | ||
DOCKER_BUILDX_TAG_OPTS= | ||
TAGS= | ||
for TAG in $(echo "$3" | tr ',' ' ') | ||
do | ||
DOCKER_BUILDX_TAG_OPTS="$DOCKER_BUILDX_TAG_OPTS --tag $2:$TAG" | ||
TAGS="$TAGS --tag $2:$TAG" | ||
done | ||
docker buildx build --platform $1 $DOCKER_BUILDX_TAG_OPTS -f $4 . | ||
|
||
PUSH= | ||
if [ $5 = true ]; | ||
then | ||
PUSH="--push" | ||
fi | ||
|
||
BUILD_ARGS= | ||
for ARG in $(echo "$6" | tr ',' ' ') | ||
do | ||
BUILD_ARGS="$BUILD_ARGS --build-arg $ARG" | ||
done | ||
|
||
docker buildx build --platform $1 $PUSH $TAGS $BUILD_ARGS -f $4 . |
This file was deleted.
Oops, something went wrong.