From 11f3f27d00e7d7fde240bcc1779ba21710eab9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E6=A5=BD=E5=9D=82=20=E7=99=BD?= Date: Mon, 30 Oct 2023 14:19:37 +0000 Subject: [PATCH] dockerfile --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index eec1ee0..6ca7af3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,7 @@ FROM golang:1.20-alpine WORKDIR /app # 安装git,克隆代码仓库,编译应用,然后卸载git -RUN echo 'nameserver 1.1.1.1' > /etc/resolv.conf && \ - apk add --no-cache git && \ +RUN apk add --no-cache git && \ git clone https://gitlab.ni-co.moe/shira/temp-mail-receiver.git /tmp/code && \ cd /tmp/code && \ go build -o /app/myapp && \ @@ -20,4 +19,4 @@ RUN chmod +x /app/generate-config.sh # 设置启动命令 ENTRYPOINT ["/app/generate-config.sh"] -CMD ["/app/myapp", "-c", "config.json"] \ No newline at end of file +CMD ["/app/myapp"] \ No newline at end of file