-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (14 loc) · 590 Bytes
/
Dockerfile
File metadata and controls
21 lines (14 loc) · 590 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM golang:1.19.3 AS builder
WORKDIR /build
COPY ./goql-plugin/go.mod ./goql-plugin/go.sum /build/
RUN go mod download
COPY ./goql-plugin/ .
RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o goql ./cmd
FROM kong:3.0.1-ubuntu
USER root
RUN apt update && apt install -y curl git gcc musl-dev ca-certificates
RUN luarocks install luaossl OPENSSL_DIR=/usr/local/kong CRYPTO_DIR=/usr/local/kong
COPY --from=builder /build/goql /usr/local/bin/goql
RUN chown kong:0 /usr/local/bin/goql && chmod 755 /usr/local/bin/goql
COPY --from=builder /build/postgres /usr/local/postgres
USER kong