Reduce the docker image size further by basing on scratch instead of alpine
Unfortunately /etc/ssl/certs/ca-certificates.crt is still a dependency, but it's easy enough to just grab it from an Alpine image during build
This commit is contained in:
parent
189b8895b0
commit
1ce8391c2b
1 changed files with 5 additions and 1 deletions
|
@ -1,8 +1,12 @@
|
|||
FROM alpine:3.19
|
||||
FROM alpine:3.19 as base
|
||||
RUN apk --no-cache add ca-certificates
|
||||
|
||||
FROM scratch
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
|
||||
COPY --from=base /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
WORKDIR /app
|
||||
COPY build/glance-$TARGETOS-$TARGETARCH /app/glance
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue