diff --git a/.github/Dockerfile b/.github/Dockerfile index 213da4b..e56659c 100644 --- a/.github/Dockerfile +++ b/.github/Dockerfile @@ -1,4 +1,5 @@ FROM alpine:latest +ARG TARGETARCH RUN apk add --no-cache \ graphviz \ ttf-freefont \ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27832e8..318c50c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -121,6 +121,8 @@ jobs: runs-on: ubuntu-latest needs: [ go-binaries ] steps: + - name: Checkout + uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -138,6 +140,8 @@ jobs: - name: Build uses: docker/build-push-action@v6 with: + context: . + file: .github/Dockerfile push: true tags: aoepeople/vistecture:${{ github.ref_name }} platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile index b722fee..cbb32a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ -FROM node:15.5.1-alpine3.12 as frontend +FROM node:15.5.1-alpine3.12 AS frontend COPY . /app RUN apk add --update python3 make gcc g++ RUN cd /app/controller/web/template && npm install && npm run build -FROM golang:1.17 as build +FROM golang:1.17 AS build ENV GOOS=linux ENV CGO_ENABLED=0 COPY . /app