Skip to content

Commit

Permalink
Reduced container image size (#64)
Browse files Browse the repository at this point in the history
* reduced container image size

* added upx to builder
  • Loading branch information
czechbol authored Sep 10, 2024
1 parent 6059f16 commit 6103965
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM golang:1.17.7-buster as builder
FROM golang:1.20.3-alpine as builder

RUN apk add --no-cache bash upx

# Set working directory
WORKDIR /usr/src/librespeed-cli
Expand All @@ -9,9 +11,9 @@ COPY . .
# Build librespeed-cli
RUN ./build.sh

FROM golang:1.17.7-buster
FROM alpine:3.17

# Copy librespeed-cli binary
COPY --from=builder /usr/src/librespeed-cli/out/librespeed-cli* /usr/src/librespeed-cli/librespeed-cli
COPY --from=builder /usr/src/librespeed-cli/out/librespeed-cli* /bin/librespeed-cli

ENTRYPOINT ["/usr/src/librespeed-cli/librespeed-cli"]
CMD ["/bin/librespeed-cli"]

0 comments on commit 6103965

Please sign in to comment.