parent
60bf6ba642
commit
436df32c2c
7 changed files with 131 additions and 27 deletions
|
|
@ -21,9 +21,11 @@ COPY . /opt/third_party/
|
|||
# install build tools
|
||||
RUN apk update \
|
||||
&& apk upgrade \
|
||||
&& apk add -U bash cmake \
|
||||
&& apk add -U bash cmake ninja \
|
||||
&& bash /opt/third_party/build.sh -p
|
||||
|
||||
ENV NINJA_STATUS "[%p/%f/%t]"
|
||||
|
||||
# install gRPC
|
||||
FROM base as grpc
|
||||
RUN bash /opt/third_party/build.sh -g v1.49.2
|
||||
|
|
@ -39,7 +41,17 @@ COPY --from=grpc /opt/third_party/install/ /usr
|
|||
COPY --from=otel-cpp /opt/third_party/install/ /usr
|
||||
RUN bash /opt/third_party/build.sh -n
|
||||
|
||||
FROM alpine:3.18.0 as final
|
||||
COPY --from=base /opt/third_party/init_module.sh /usr/local/bin/init_module.sh
|
||||
FROM cgr.dev/chainguard/go:latest as build-init
|
||||
|
||||
WORKDIR /go/src/app
|
||||
COPY . .
|
||||
|
||||
RUN go mod download
|
||||
RUN CGO_ENABLED=0 go build -o /go/bin/init_module
|
||||
|
||||
FROM cgr.dev/chainguard/static as final
|
||||
COPY --from=build-init /go/bin/init_module /
|
||||
COPY --from=nginx /etc/nginx/modules /etc/nginx/modules
|
||||
COPY --from=nginx /opt/third_party/install/lib /etc/nginx/modules
|
||||
|
||||
CMD ["/init_module"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue