Skip to content

Commit

Permalink
docker: back to alpine image
Browse files Browse the repository at this point in the history
  • Loading branch information
pviotti committed Mar 10, 2024
1 parent 85670eb commit c3e4e35
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
FROM golang:1.22
FROM golang:1.22-alpine AS builder

WORKDIR /app

RUN apk add --update --no-cache gcc musl-dev

COPY go.mod .
COPY go.sum .
RUN go mod download && go mod verify

COPY . .
RUN go build -o pocket-counter .

FROM alpine:3.19

WORKDIR /app

VOLUME /app/data

COPY --from=builder /app/pocket-counter .

EXPOSE 8080

CMD ["./pocket-counter"]

0 comments on commit c3e4e35

Please sign in to comment.