Docker image switch to debian

This commit is contained in:
Lan Tian 2020-04-09 23:31:25 +08:00
parent ca90a0ef9f
commit 72f7d02948
No known key found for this signature in database
GPG Key ID: 27F31700E751EC22
2 changed files with 8 additions and 6 deletions

View File

@ -1,13 +1,14 @@
ARG THIS_ARCH_ALT=amd64 ARG THIS_ARCH_ALT=amd64
FROM multiarch/alpine:${THIS_ARCH_ALT}-edge FROM ${THIS_ARCH}/debian:buster
LABEL Lan Tian "lantian@lantian.pub" LABEL Lan Tian "lantian@lantian.pub"
ENV GOOS=linux GOARCH=${THIS_ARCH_GO} ENV GOOS=linux GOARCH=${THIS_ARCH_GO}
WORKDIR /root WORKDIR /root
COPY . . COPY . .
RUN apk -q --no-cache add go build-base \ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y golang \
&& cd /root && go build -o /frontend \ && cd /root && go build -o /frontend \
&& cd / && rm -rf /root/* \ && cd / && rm -rf /root/* \
&& apk del --purge go build-base && apt-get -qq purge -y golang \
&& apt-get -qq autoremove --purge -y && apt-get clean && rm -rf /var/lib/apt/lists
ENTRYPOINT ["/frontend"] ENTRYPOINT ["/frontend"]

View File

@ -1,13 +1,14 @@
ARG THIS_ARCH_ALT=amd64 ARG THIS_ARCH_ALT=amd64
FROM multiarch/alpine:${THIS_ARCH_ALT}-edge FROM ${THIS_ARCH}/debian:buster
LABEL Lan Tian "lantian@lantian.pub" LABEL Lan Tian "lantian@lantian.pub"
ENV GOOS=linux GOARCH=${THIS_ARCH_GO} ENV GOOS=linux GOARCH=${THIS_ARCH_GO}
WORKDIR /root WORKDIR /root
COPY . . COPY . .
RUN apk -q --no-cache add go build-base \ RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y golang traceroute \
&& cd /root && go build -o /proxy \ && cd /root && go build -o /proxy \
&& cd / && rm -rf /root/* \ && cd / && rm -rf /root/* \
&& apk del --purge go build-base && apt-get -qq purge -y golang \
&& apt-get -qq autoremove --purge -y && apt-get clean && rm -rf /var/lib/apt/lists
ENTRYPOINT ["/proxy"] ENTRYPOINT ["/proxy"]