Compare commits
No commits in common. "bafbb86b7ec2a84e4e216c0b40c6b6cbed44572f" and "350539c3ac856dc18c1c5e3f5754177e6c21d06e" have entirely different histories.
bafbb86b7e
...
350539c3ac
2 changed files with 9 additions and 15 deletions
|
@ -1,3 +1,3 @@
|
|||
FROM docker.io/moby/buildkit:v0.25.1
|
||||
FROM docker.io/moby/buildkit:v0.25.1-rootless
|
||||
COPY entrypoint.sh /usr/local/bin/
|
||||
ENTRYPOINT ["entrypoint.sh"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh -e
|
||||
#!/bin/sh -ex
|
||||
|
||||
export DOCKER_CONFIG="$HOME/.docker"
|
||||
mkdir -p "$DOCKER_CONFIG"
|
||||
|
@ -7,13 +7,13 @@ mkdir -p "$DOCKER_CONFIG"
|
|||
[ -f .env ] && . ./.env
|
||||
|
||||
if [ -z "$IMAGEAPP" ]; then
|
||||
IMAGEAPP="${GITHUB_SERVER_URL#*://}/$INPUT_IMAGE"
|
||||
REGISTRY="$(echo "$GITHUB_SERVER_URL" | sed 's .*:// ')"
|
||||
IMAGEAPP="$REGISTRY/$INPUT_IMAGE"
|
||||
fi
|
||||
|
||||
if [ "$INPUT_CACHE" = true ]; then
|
||||
IMAGECACHE="${IMAGEAPP%:*}/cache"
|
||||
set -- --import-cache "type=registry,ref=$IMAGECACHE" \
|
||||
--export-cache "type=registry,ref=$IMAGECACHE"
|
||||
set -- --import-cache "type=registry,ref=$IMAGEAPP/cache" \
|
||||
--export-cache "type=registry,ref=$IMAGEAPP/cache"
|
||||
fi
|
||||
|
||||
cat <<EOF > "$DOCKER_CONFIG/config.json"
|
||||
|
@ -26,12 +26,6 @@ cat <<EOF > "$DOCKER_CONFIG/config.json"
|
|||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
DIR="$(dirname "$INPUT_DOCKERFILE")"
|
||||
FILENAME="$(basename "$INPUT_DOCKERFILE")"
|
||||
|
||||
set -x
|
||||
buildctl-daemonless.sh build --frontend dockerfile.v0 "$@" \
|
||||
-o "type=image,name=$IMAGEAPP,push=true" \
|
||||
--opt filename="$FILENAME" \
|
||||
--local context="$DIR" --local dockerfile="$DIR"
|
||||
buildctl build "$@" -o "type=image,name=$IMAGEAPP,push=true" \
|
||||
--local context="$(dirname "$INPUT_DOCKERFILE")" \
|
||||
--local dockerfile="$INPUT_DOCKERFILE"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue