Skip to content

Commit 7a8e8ca

Browse files
committed
Build with alpine
1 parent a452bc3 commit 7a8e8ca

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

docker/Dockerfile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,21 @@ ARG __TARGETPLATFORM_DASHES=${TARGETPLATFORM/\//-}
1111
ARG __TARGETPLATFORM_GO_NOTATION=${__TARGETPLATFORM_DASHES/arm\/v7/arm-7}
1212

1313
# --- Go Builder ---
14-
FROM --platform=${BUILDPLATFORM} docker.io/golang:${GO_VERSION} AS builder
14+
FROM --platform=${BUILDPLATFORM} docker.io/golang:${GO_VERSION}-alpine AS builder
1515

1616
ARG LD_FLAGS=""
17-
ENV DEBIAN_FRONTEND=noninteractive
1817

19-
RUN apt-get update && apt-get install -yq --no-install-recommends \
20-
ca-certificates \
21-
git
18+
RUN apk add --no-cache ca-certificates git make bash
2219

2320
COPY . /src/gotify
2421

2522
RUN cd /src/gotify && \
2623
LD_FLAGS=${LD_FLAGS} make OUTPUT=/target/app/gotify-cli _build_within_docker
2724

28-
FROM debian:${DEBIAN}
25+
FROM docker.io/library/alpine:latest
2926

30-
WORKDIR /app
27+
RUN apk add --no-cache ca-certificates
3128

32-
RUN export DEBIAN_FRONTEND=noninteractive && apt-get update && apt-get install -yq --no-install-recommends \
33-
tzdata \
34-
curl \
35-
ca-certificates && \
36-
rm -rf /var/lib/apt/lists/*
29+
COPY --from=builder /target/app/gotify-cli /gotify-cli
3730

38-
COPY --from=builder /target /
39-
40-
ENTRYPOINT ["./gotify-cli"]
31+
ENTRYPOINT ["/gotify-cli"]

0 commit comments

Comments
 (0)