good morning!!!!

Skip to content
Snippets Groups Projects
Dockerfile 421 B
Newer Older
Garet Halliday's avatar
a
Garet Halliday committed
# syntax=docker/dockerfile:1
a's avatar
a committed
FROM golang:1.23-alpine as GOBUILDER
Garet Halliday's avatar
a
Garet Halliday committed
RUN apk add build-base git
WORKDIR /src
a's avatar
ok  
a committed

COPY go.mod go.sum .
RUN go mod download
COPY test test
copy lib lib
copy cmd cmd
Garet Halliday's avatar
a
Garet Halliday committed

RUN go mod tidy
Garet Halliday's avatar
Garet Halliday committed
RUN go build -o pggat ./cmd/pggat
Garet Halliday's avatar
a
Garet Halliday committed

FROM alpine:latest
a's avatar
a committed
WORKDIR /
RUN apk add --no-cache bash
a's avatar
a committed

a's avatar
ok  
a committed
COPY --from=GOBUILDER /src/pggat /usr/bin/pggat
COPY presets /presets
a's avatar
a committed
COPY entrypoint.sh .
a's avatar
a committed

a's avatar
ok  
a committed
ENTRYPOINT ["/entrypoint.sh"]