Skip to content

Commit

Permalink
chore: add platform to docker script
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed May 5, 2024
1 parent e1015e5 commit c508420
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 23 deletions.
28 changes: 8 additions & 20 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up custom builder
id: buildx

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:master
network=host
buildkitd-flags: '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
# Puedes agregar más opciones según tus necesidades


- name: Login to Docker Hub
uses: docker/login-action@v3
Expand All @@ -30,13 +22,9 @@ jobs:

- name: Prepare .env file
run: |
cp .env.production.example .env.production
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: false
tags: dokploy/dokploy:canary
builder: ${{ steps.buildx.outputs.name }}
cp .env.production.example .env.production
- name: Build Docker image using custom script
run: |
chmod +x ./docker/build.sh
./docker/build.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
4 changes: 1 addition & 3 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ else
TAG="$VERSION"
fi

BUILDER=$(docker buildx create --use)

docker buildx build --platform linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' .
docker build --platform=linux/amd64,linux/arm64 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' .

docker buildx rm $BUILDER

0 comments on commit c508420

Please sign in to comment.