Skip to content

Commit 6103965

Browse files
authored
Reduced container image size (#64)
* reduced container image size * added upx to builder
1 parent 6059f16 commit 6103965

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM golang:1.17.7-buster as builder
1+
FROM golang:1.20.3-alpine as builder
2+
3+
RUN apk add --no-cache bash upx
24

35
# Set working directory
46
WORKDIR /usr/src/librespeed-cli
@@ -9,9 +11,9 @@ COPY . .
911
# Build librespeed-cli
1012
RUN ./build.sh
1113

12-
FROM golang:1.17.7-buster
14+
FROM alpine:3.17
1315

1416
# Copy librespeed-cli binary
15-
COPY --from=builder /usr/src/librespeed-cli/out/librespeed-cli* /usr/src/librespeed-cli/librespeed-cli
17+
COPY --from=builder /usr/src/librespeed-cli/out/librespeed-cli* /bin/librespeed-cli
1618

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

0 commit comments

Comments
 (0)