From 1a1957f208488a7633752782229b14e37fa3d4b0 Mon Sep 17 00:00:00 2001 From: pupilcc Date: Tue, 30 Jul 2024 23:12:15 +0800 Subject: [PATCH] build: run image --- Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index fdd6a87..3f3c90f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,15 @@ FROM golang:1.21.1 as builder - RUN apt-get update && apt-get install -y gcc libc6-dev - WORKDIR /go/src/autossl COPY go.mod . COPY go.sum . RUN go mod download COPY . . - RUN CGO_ENABLED=1 GOOS=linux go build -a -o /go/bin/autossl . +FROM alpine:latest RUN apk --no-cache add ca-certificates curl openssl RUN curl https://get.acme.sh | sh - WORKDIR /root/ COPY --from=builder /go/bin/autossl . EXPOSE 1323