Skip to content
This repository has been archived by the owner on Dec 25, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
walnuts1018 committed Feb 20, 2024
1 parent f6a3d1a commit cbabaf4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/docker-back.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:
- arch: "amd64"
runs-on: ubuntu-latest
platform: linux/amd64
build-arg: "arch=amd64"
- arch: "arm64"
runs-on: ubuntu-latest
platform: linux/arm64
platform: linux/amd64
build-arg: "arch=arm64"
runs-on: ${{ matrix.runs-on }}
outputs:
imageTag: ${{ env.ImageTag }}
Expand Down Expand Up @@ -64,6 +66,7 @@ jobs:
context: .
file: ./back-prod.Dockerfile
platforms: ${{ matrix.platform }}
build-args: ${{ matrix.build-arg }}
cache-from: type=gha
cache-to: type=gha,mode=max
tags: |
Expand Down
4 changes: 3 additions & 1 deletion back-prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ WORKDIR ${ROOT}
COPY ./back ./
RUN go get

RUN CGO_ENABLED=0 GOOS=linux go build -o server main.go && chmod +x ./server

ARG arch=amd64
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${arch} go build -o server main.go && chmod +x ./server

FROM alpine:3
WORKDIR /app
Expand Down

0 comments on commit cbabaf4

Please sign in to comment.