Fix docker build error

This commit is contained in:
Lan Tian
2020-04-09 23:38:59 +08:00
parent 76e8e35e81
commit 12b4700397
9 changed files with 83 additions and 22 deletions

13
proxy/Dockerfile.amd64 Normal file
View File

@@ -0,0 +1,13 @@
FROM amd64/debian:buster
LABEL Lan Tian "lantian@lantian.pub"
ENV GOOS=linux GOARCH=amd64
WORKDIR /root
COPY . .
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y golang traceroute \
&& cd /root && go build -o /proxy \
&& cd / && rm -rf /root/* \
&& apt-get -qq purge -y golang \
&& apt-get -qq autoremove --purge -y && apt-get clean && rm -rf /var/lib/apt/lists
ENTRYPOINT ["/proxy"]