diff --git a/Containerfile b/Containerfile index 0a4b49f..008b4c8 100644 --- a/Containerfile +++ b/Containerfile @@ -1,8 +1,10 @@ FROM library/golang:1.21 AS build +RUN apt-get update && apt-get install -y ca-certificates && mkdir -p /tmp/etc/ssl/certs && cp /etc/ssl/certs/ca-certificates.crt /tmp/etc/ssl/certs/ca-certificates.crt ADD . /go/s3staticsite WORKDIR /go/s3staticsite RUN CGO_ENABLED=0 go build . FROM scratch +COPY --from=build /tmp/etc /etc COPY --from=build /go/s3staticsite/s3staticsite /s3staticsite ENTRYPOINT ["/s3staticsite"] diff --git a/serve.go b/serve.go index 4702bd3..ec73a71 100644 --- a/serve.go +++ b/serve.go @@ -45,6 +45,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { return } + slog.Warn("failed to stat object", "err", err, "bucket", domain, "path", path) http.Error(w, err.Error(), http.StatusInternalServerError) return }