From 75f1cb619ba22a53885c8ae0d0592de9d2614fb5 Mon Sep 17 00:00:00 2001 From: Henry Dollman Date: Sun, 21 Jul 2024 20:30:32 -0400 Subject: [PATCH] update hub dockerfile --- hub/dockerfile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/hub/dockerfile b/hub/dockerfile index fb50343..21ac584 100644 --- a/hub/dockerfile +++ b/hub/dockerfile @@ -6,26 +6,29 @@ WORKDIR /app COPY go.mod go.sum ./ RUN go mod download +# Copy source files COPY *.go ./ COPY migrations ./migrations +COPY site/dist ./site/dist +COPY site/*.go ./site + +RUN apk add --no-cache \ + unzip \ + ca-certificates + +RUN update-ca-certificates # Build ARG TARGETOS TARGETARCH RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags "-w -s" -o /beszel . # ? ------------------------- -FROM alpine:latest - -RUN apk add --no-cache \ - unzip \ - ca-certificates +FROM scratch COPY --from=builder /beszel / +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ -COPY ./site/dist /site/dist - -EXPOSE 8080 +EXPOSE 8090 ENTRYPOINT [ "/beszel" ] - -CMD ["serve", "--http=0.0.0.0:8080"] \ No newline at end of file +CMD ["serve", "--http=0.0.0.0:8090"] \ No newline at end of file