mirror of
https://github.com/vcscsvcscs/GenerationsHeritage.git
synced 2025-08-14 06:49:05 +02:00
add multiplatform img support
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
FROM arm64v8/golang:1.22.2-alpine as build
|
||||
FROM --platform=$BUILDPLATFORM golang:alpine AS build
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN GOOS=linux GOARCH=arm64 go build -o auth-service
|
||||
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -o auth-service
|
||||
|
||||
RUN apk update && apk add ca-certificates && update-ca-certificates
|
||||
|
||||
FROM arm64v8/busybox:1.36.1
|
||||
FROM --platform=$TARGETPLATFORM busybox:1.36.1
|
||||
|
||||
COPY --from=build /etc/ssl/certs /etc/ssl/certs
|
||||
COPY --from=build /app/auth-service /app/
|
||||
|
Reference in New Issue
Block a user