Skip to content

Commit

Permalink
Update Dockerfile and GoReleaser settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickdappollonio committed Oct 27, 2021
1 parent 3ced332 commit 115b865
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
http-server
dist/
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dockers:
- image_templates:
- "patrickdappollonio/docker-http-server:{{ .Tag }}"
- "patrickdappollonio/docker-http-server:latest"
extra_files:
- 'html/'
changelog:
sort: asc
filters:
Expand Down
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
FROM golang:1.17 as builder
WORKDIR /app
ADD . .
ENV CGO_ENABLED=0
RUN go build -trimpath -ldflags='-extldflags=-static -w -s' -o http-server

FROM scratch
COPY html /html
COPY --from=builder /app/http-server /http-server
COPY http-server /http-server
EXPOSE 5000
ENTRYPOINT ["/http-server"]
2 changes: 1 addition & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<title>HTTP Server</title>
</head>
<body style="font-family: Arial,Helvetica Neue,Helvetica,sans-serif; display: block; width: 75%; min-width: 350px; margin: 30vh auto; text-align: center">
<p><strong>Welcome to Docker HTTP Server!</strong> If you're seeing this, you haven't configured a directory to show, so we're showing the default one.</p>
<p><strong>Welcome to HTTP Server!</strong> If you're seeing this, you haven't configured a directory to show, so we're showing the default one.</p>
<p>Please check the documentation at <a href="https://github.com/patrickdappollonio/http-server" target="_blank">Github<a> to understand how to set this up using the <code>--path</code> flag or the <code>$FILE_SERVER_PATH</code> environment variable.</p>
</body>
</html>

0 comments on commit 115b865

Please sign in to comment.