FIX(docker): use kaniko executor binary
- Download Kaniko executor binary directly - Remove docker run dependency - Use absolute paths instead of container volume mounts - Fixes Docker daemon connection error
This commit is contained in:
@@ -49,6 +49,11 @@ jobs:
|
|||||||
type=sha,prefix={{branch}}-sha-,format=long
|
type=sha,prefix={{branch}}-sha-,format=long
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
|
- name: Download Kaniko executor
|
||||||
|
run: |
|
||||||
|
wget -O /tmp/kaniko-executor https://github.com/GoogleContainerTools/kaniko/releases/download/v1.23.2/executor-arm64
|
||||||
|
chmod +x /tmp/kaniko-executor
|
||||||
|
|
||||||
- name: Build and push with Kaniko
|
- name: Build and push with Kaniko
|
||||||
id: build
|
id: build
|
||||||
run: |
|
run: |
|
||||||
@@ -61,12 +66,10 @@ jobs:
|
|||||||
done <<< "$TAGS"
|
done <<< "$TAGS"
|
||||||
|
|
||||||
# Build and push with Kaniko (with cache)
|
# Build and push with Kaniko (with cache)
|
||||||
docker run --rm \
|
/tmp/kaniko-executor \
|
||||||
-v $(pwd):/workspace \
|
--context=$(pwd)/services/nextjs \
|
||||||
-v /tmp/kaniko-config:/kaniko/.docker:ro \
|
--dockerfile=$(pwd)/deploy/docker/Dockerfile.prod \
|
||||||
gcr.io/kaniko-project/executor:arm64-latest \
|
--docker-config=/tmp/kaniko-config \
|
||||||
--context=/workspace/services/nextjs \
|
|
||||||
--dockerfile=/workspace/deploy/docker/Dockerfile.prod \
|
|
||||||
$DESTINATIONS \
|
$DESTINATIONS \
|
||||||
--cache=true \
|
--cache=true \
|
||||||
--cache-repo=${{ env.REGISTRY }}/${{ steps.lowercase.outputs.repo }}/cache \
|
--cache-repo=${{ env.REGISTRY }}/${{ steps.lowercase.outputs.repo }}/cache \
|
||||||
|
|||||||
Reference in New Issue
Block a user