Skip to content

Commit

Permalink
Merge pull request #37 from mariusihring/patch-1
Browse files Browse the repository at this point in the history
feat: Update build.sh to provide arm64, aarch64 and x86 images
  • Loading branch information
Siumauricio authored May 4, 2024
2 parents 47146df + c5f7f8b commit 2e62c7f
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 58 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,5 @@ jobs:
- name: Build and push Docker image using custom script
run: |
chmod +x ./docker/build.sh
chmod +x ./docker/push.sh
./docker/build.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
./docker/push.sh ${{ github.ref_name == 'canary' && 'canary' || '' }}
9 changes: 4 additions & 5 deletions docker/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ else
TAG="$VERSION"
fi

docker build --platform linux/amd64 --pull --rm -f 'Dockerfile' -t "dokploy/dokploy:${TAG}" .
BUILDER=$(docker buildx create --use)

if [ "$BUILD_TYPE" != "canary" ]; then
# Tag the production build as latest
docker tag "dokploy/dokploy:${TAG}" "dokploy/dokploy:latest"
fi
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' .

docker buildx rm $BUILDER
9 changes: 6 additions & 3 deletions docker/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
# Determine the type of build based on the first script argument
BUILD_TYPE=${1:-production}

BUILDER=$(docker buildx create --use)

if [ "$BUILD_TYPE" == "canary" ]; then
TAG="canary"
echo PUSHING CANARY
docker push "dokploy/dokploy:${TAG}"
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' --push .
else
echo "PUSHING PRODUCTION"
VERSION=$(node -p "require('./package.json').version")
docker push "dokploy/dokploy:${VERSION}"
docker push "dokploy/dokploy:latest"
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:latest" -t "dokploy/dokploy:${VERSION}" -f 'Dockerfile' --push .
fi

docker buildx rm $BUILDER
5 changes: 0 additions & 5 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
/** @type {import("next").NextConfig} */
const nextConfig = {
reactStrictMode: true,
logging:{
fetches:{
fullUrl:false
}
},

/**
* If you are using `appDir` then you must comment the below `i18n` config out.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"lucia": "^3.0.1",
"lucide-react": "^0.312.0",
"nanoid": "3",
"next": "^14.1.3",
"next": "^13.2.4",
"next-themes": "^0.2.1",
"node-os-utils": "1.3.7",
"node-pty": "1.0.0",
Expand Down
96 changes: 54 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2e62c7f

Please sign in to comment.