Skip to content

Commit

Permalink
add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
albertodonato committed Jan 11, 2024
1 parent c7081da commit 3e3520c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit 3e3520c

Please sign in to comment.