Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi architecture support for player-router #65

Open
rcastley opened this issue Feb 26, 2025 · 0 comments
Open

Multi architecture support for player-router #65

rcastley opened this issue Feb 26, 2025 · 0 comments
Assignees

Comments

@rcastley
Copy link
Collaborator

An updated Dockerfile could look like this:

# Build stage
FROM --platform=$BUILDPLATFORM golang:1.23-bookworm AS builder

ARG TARGETOS
ARG TARGETARCH
ARG VERSION

WORKDIR /app

RUN mkdir build

COPY . .

RUN go mod download && \
    CGO_ENABLED=0 \
    GOOS=$TARGETOS \
    GOARCH=$TARGETARCH \
    go build \
    -ldflags "-s -w" \
    -trimpath \
    -a \
    -o build/player-router main.go

# Final stage
FROM --platform=$TARGETPLATFORM gcr.io/distroless/static-debian12:nonroot

WORKDIR /app
COPY --from=builder /app/build/player-router .
USER nonroot:nonroot

ENTRYPOINT ["/app/player-router"]

But I am unsure on how to get devspace to build amd64 and arm64 images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants