1
1
mirror of https://github.com/wader/fq.git synced 2024-11-21 13:33:22 +03:00
fq/Dockerfile
Mattias Wadman a1bbd276a5 mod: Update golang.org/x/{crypto,sys,term,text,net}
Update go verison in Dockerfile

Fixes #1029 #1028 #1027 #1026 #1022
2024-11-12 11:08:02 +01:00

29 lines
631 B
Docker

# bump: docker-golang /FROM golang:([\d.]+)/ docker:golang|^1
FROM golang:1.23.3-bookworm AS base
# expect is used to test cli
RUN \
apt-get update -q && \
apt-get install --no-install-recommends -qy \
expect
# docker build --target dev -t fq-dev - < Dockerfile && docker run --rm -ti -v "$PWD:/$PWD" -w "$PWD" fq-dev
FROM base AS dev
FROM base AS builder
WORKDIR $GOPATH/src/fq
COPY go.mod go.sum ./
RUN go mod download
COPY Makefile *.go ./
COPY pkg pkg
COPY internal internal
COPY format format
RUN make test fq
RUN cp fq /fq
FROM scratch
COPY --from=builder /fq /fq
RUN ["/fq", "--version"]
ENTRYPOINT ["/fq"]