From c5ef96bf19d642b0fd0ad7b386256325d3039739 Mon Sep 17 00:00:00 2001 From: Andrew Jarvis Date: Sat, 17 Feb 2024 01:05:05 -0500 Subject: [PATCH] Use docker buildx --- .github/workflows/build-and-deploy.yml | 11 +++-------- Dockerfile | 3 +++ 2 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index c061ada..87f7d86 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -28,11 +28,6 @@ jobs: - name: Build application run: npm run build - - name: Install pack CLI - uses: buildpacks/github-actions/setup-pack@v5.1.0 - - - name: Build image - run: pack build ${{ secrets.REGISTRY }}/basic-chess-ai:latest --builder paketobuildpacks/builder-jammy-base:latest --buildpack gcr.io/paketo-buildpacks/nginx --env BP_WEB_SERVER=nginx - - - name: Push image to registry - run: docker push ${{ secrets.REGISTRY }}/basic-chess-ai:latest + - name: Build and push image + run: | + docker buildx build --platform linux/arm64 -t ${{ secrets.REGISTRY }}/basic-chess-ai:latest-arm64 --push . diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd70931 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +# Use the official Nginx image from Docker Hub +FROM nginx:latest +COPY public /usr/share/nginx/html