All checks were successful
continuous-integration/drone/push Build is passing
21 lines
431 B
Docker
21 lines
431 B
Docker
FROM golang:1.20-alpine3.18 AS builder
|
|
|
|
WORKDIR /usr/local/src/pg_autopool
|
|
COPY go.* ./
|
|
COPY *.go ./
|
|
RUN go mod download
|
|
|
|
RUN mkdir bin/ && go build -o bin/ ./...
|
|
|
|
FROM alpine:3.18
|
|
|
|
RUN apk add --no-cache pgpool gettext postgresql-client && \
|
|
mkdir /var/run/pgpool/ && \
|
|
chmod 777 /var/run/pgpool && \
|
|
chmod 777 /var/log
|
|
|
|
COPY --from=builder /usr/local/src/pg_autopool/bin/pg_autopool /
|
|
|
|
EXPOSE 5432
|
|
|
|
ENTRYPOINT ["/pg_autopool"] |