mirror of
https://github.com/gopasspw/gopass.git
synced 2025-12-12 20:35:49 +01:00
Most distributions do not package 1.25 yet and we do not rely on 1.25 features so far. Make sure to propagate the go.mod version and not the Go version used to build/run in the postrel helper. Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
69 lines
1.9 KiB
Docker
69 lines
1.9 KiB
Docker
FROM docker.io/library/golang:1.25-alpine@sha256:b6ed3fd0452c0e9bcdef5597f29cc1418f61672e9d3a2f55bf02e7222c014abd AS build-env
|
|
|
|
ENV CGO_ENABLED=0
|
|
|
|
RUN apk add --no-cache make git ncurses
|
|
|
|
# Build gopass
|
|
WORKDIR /home/runner/work/gopass/gopass
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ARG goflags_arg=""
|
|
ENV GOFLAGS=$goflags_arg
|
|
|
|
RUN make clean
|
|
RUN make gopass
|
|
|
|
# Build gopass-jsonapi
|
|
WORKDIR /home/runner/work/gopass
|
|
|
|
RUN git clone https://github.com/gopasspw/gopass-jsonapi.git
|
|
|
|
WORKDIR /home/runner/work/gopass/gopass-jsonapi
|
|
RUN go mod download
|
|
RUN make clean
|
|
RUN make gopass-jsonapi
|
|
|
|
# Build gopass-hibp
|
|
WORKDIR /home/runner/work/gopass
|
|
|
|
RUN git clone https://github.com/gopasspw/gopass-hibp.git
|
|
|
|
WORKDIR /home/runner/work/gopass/gopass-hibp
|
|
RUN go mod download
|
|
RUN make clean
|
|
RUN make gopass-hibp
|
|
|
|
# Build gopass-summon-provider
|
|
WORKDIR /home/runner/work/gopass
|
|
|
|
RUN git clone https://github.com/gopasspw/gopass-summon-provider.git
|
|
|
|
WORKDIR /home/runner/work/gopass/gopass-summon-provider
|
|
RUN go mod download
|
|
RUN make clean
|
|
RUN make gopass-summon-provider
|
|
|
|
# Build git-credential-gopass
|
|
WORKDIR /home/runner/work/gopass
|
|
|
|
RUN git clone https://github.com/gopasspw/git-credential-gopass.git
|
|
|
|
WORKDIR /home/runner/work/gopass/git-credential-gopass
|
|
RUN go mod download
|
|
RUN make clean
|
|
RUN make git-credential-gopass
|
|
|
|
FROM docker.io/library/alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
|
|
RUN apk add --no-cache ca-certificates git gnupg
|
|
COPY --from=build-env /home/runner/work/gopass/gopass/gopass /usr/local/bin/
|
|
COPY --from=build-env /home/runner/work/gopass/gopass-jsonapi/gopass-jsonapi /usr/local/bin/
|
|
COPY --from=build-env /home/runner/work/gopass/gopass-hibp/gopass-hibp /usr/local/bin/
|
|
COPY --from=build-env /home/runner/work/gopass/gopass-summon-provider/gopass-summon-provider /usr/local/bin/
|
|
COPY --from=build-env /home/runner/work/gopass/git-credential-gopass/git-credential-gopass /usr/local/bin/
|