From 115b8655435cd760cd92bd9b3126088f0793eda2 Mon Sep 17 00:00:00 2001
From: Patrick D'appollonio <patrick@dappollonio.us>
Date: Tue, 26 Oct 2021 21:59:52 -0400
Subject: [PATCH] Update Dockerfile and GoReleaser settings.

---
 .gitignore      | 1 +
 .goreleaser.yml | 2 ++
 Dockerfile      | 8 +-------
 html/index.html | 2 +-
 4 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/.gitignore b/.gitignore
index d8085cf..31e2a05 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 http-server
+dist/
diff --git a/.goreleaser.yml b/.goreleaser.yml
index a298293..4432255 100644
--- a/.goreleaser.yml
+++ b/.goreleaser.yml
@@ -27,6 +27,8 @@ dockers:
   - image_templates:
     - "patrickdappollonio/docker-http-server:{{ .Tag }}"
     - "patrickdappollonio/docker-http-server:latest"
+    extra_files:
+    - 'html/'
 changelog:
   sort: asc
   filters:
diff --git a/Dockerfile b/Dockerfile
index e2d818e..fc90e63 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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"]
diff --git a/html/index.html b/html/index.html
index 7ada075..d6c071c 100644
--- a/html/index.html
+++ b/html/index.html
@@ -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>