generated from projectsesame/envoy-extproc-payloadlimit-demo-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (22 loc) · 826 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM golang:1.21.6-bullseye
SHELL ["/bin/bash", "-c"]
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
RUN sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
RUN apt-get update && apt-get -y upgrade \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get -y clean
WORKDIR /build
COPY . .
ENV GOPROXY="https://goproxy.cn"
RUN go mod tidy \
&& go mod download \
&& go build -o /extproc
FROM busybox
COPY --from=0 /extproc /bin/extproc
RUN chmod +x /bin/extproc
ARG EXAMPLE=allow-and-block
EXPOSE 50051
ENTRYPOINT [ "/bin/extproc" ]
# CMD [ "allow-and-block", "--log-stream", "--log-phases", "--blocklist", "192.168.1.2" ]
CMD [ "allow-and-block", "--log-stream", "--log-phases", "--allowlist", "192.168.1.2" ]