diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..64c7d87 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM golang:latest AS build-image + +ADD . /src +RUN cd /src && \ + go build -ldflags "-linkmode external -extldflags -static" -o /target/h2static ./cmd/h2static && \ + strip -s /target/h2static + + +FROM scratch + +COPY --from=build-image /target / + +EXPOSE 8080/tcp +VOLUME /www +ENTRYPOINT ["/h2static", "-log", "-dir", "/www"]