Skip to content

Commit

Permalink
feat: add docker build for arm (#22)
Browse files Browse the repository at this point in the history
Build docker image of the login server that can run on arm64.
  • Loading branch information
Costallat authored Jun 21, 2024
1 parent 53c93ba commit 12774f2
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docker/Dockerfile.arm64
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Stage 1: Download all dependencies
FROM golang:1.16.4-alpine as builder

WORKDIR /usr/local/go/src/github.com/opentibiabr/login-server
COPY go.mod .
COPY go.sum .
COPY src ./src

RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o /bin/login-server ./src/

FROM alpine:latest

# Copy our static executable.
COPY --from=builder /bin/login-server /bin/login-server

ENTRYPOINT ["/bin/login-server"]

0 comments on commit 12774f2

Please sign in to comment.