Skip to content

Commit

Permalink
perf(docker): switch base image from debian to alpine for reduced siz…
Browse files Browse the repository at this point in the history
…e and better performance
  • Loading branch information
EverythingSuckz authored Dec 16, 2023
2 parents 670ef71 + 76ac60d commit 86b14a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.21 AS builder
RUN apt-get update && apt-get upgrade -y && apt-get install build-essential -y
FROM golang:1.21-alpine3.18 as builder
RUN apk update && apk upgrade --available && sync
WORKDIR /app
COPY . .
RUN CGO_ENABLED=0 go build -o /app/fsb -ldflags="-w -s" ./cmd/fsb

FROM scratch
COPY --from=builder /app/fsb /app/fsb
EXPOSE ${PORT}
ENTRYPOINT ["/app/fsb", "run"]
ENTRYPOINT ["/app/fsb", "run"]

0 comments on commit 86b14a1

Please sign in to comment.