reduce docker image size

This commit is contained in:
lonwern 2020-09-29 14:57:36 +08:00
parent ef5ae3e598
commit fdf4d164c5
2 changed files with 16 additions and 6 deletions

View File

@ -1,9 +1,14 @@
FROM alpine:3.12.0 AS temp
ADD bin/frpc /tmp
RUN chmod -R 777 /tmp/frpc
FROM alpine:3.12.0
WORKDIR /app
ADD bin/frpc /usr/bin
RUN chmod -R 777 /usr/bin/frpc
COPY --from=temp /tmp/frpc /usr/bin
ENTRYPOINT ["/usr/bin/frpc"]

View File

@ -1,9 +1,14 @@
FROM alpine:3.12.0 AS temp
ADD bin/frps /tmp
RUN chmod -R 777 /tmp/frps
FROM alpine:3.12.0
WORKDIR /app
ADD bin/frps /usr/bin
RUN chmod -R 777 /usr/bin/frps
COPY --from=temp /tmp/frps /usr/bin
ENTRYPOINT ["/usr/bin/frps"]