Skip to content

Commit

Permalink
fix(ui): switch away from alpine
Browse files Browse the repository at this point in the history
mexer wasn't able to run in alpine
  • Loading branch information
Adventune committed Jan 8, 2024
1 parent fb6a431 commit 5e82213
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/ui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang:1.21.5-alpine
# mexer does not work in alpine environment
FROM golang:1.21.5 AS base
FROM base AS builder

WORKDIR /app

Expand All @@ -10,8 +12,17 @@ COPY . ./

# Build
RUN CGO_ENABLED=0 GOOS=linux go build -o ./main
EXPOSE 3000
ENV PORT=3000

FROM base AS final

WORKDIR /app

# Copy binary
COPY --from=builder /app/main .
COPY --from=builder /app/views ./views
COPY --from=builder /app/static ./static

# Run
EXPOSE 3000
ENV PORT=3000
CMD ["./main"]

0 comments on commit 5e82213

Please sign in to comment.