ref: 1141e59c8781110f93144a1c0fa51af0631dfa74 tls-redirector/Dockerfile -rw-r--r-- 419 bytes
Replace fancy with go embed

This commit removes the fancy subpackage with the native `//go:embed'
functionality in Go 1.16. This does raise the minimum build version to
1.16, however it means simplicity -- all that is necessary to compile
now is just `go build'.
Add a basic Docker healthcheck
Bump dependencies

* Golang       (1.15.1 -> 1.15.6)
* Alpine Linux (3.12.0 -> 3.12.3)
2.4: Nice looking HTML error pages

This commit changes tls-redirector to output descriptive, nice looking
HTML error pages rather than the one-line text it used to output. This
is aimed at providing any would-be visitors with information indicating
why they are seeing pages from tls-redirector, and not the website
they (presumably) intended to visit.

The HTML is compiled into the binary by using `go generate' to copy
files on disk into constants.
Run `go build' and `strip' in one layer

Since `go build' will produce a new layer, the later layers will always
run, so we may as well run them in one go.
Run `go mod download' before COPY *

This commit makes `docker build' faster by allowing third party
dependencies to be cached provided the go.{mod,sum} files do not
change and the layers previous to that haven't changed (i.e. version of
Go or Alpine Linux).

Without an explicit download step, `go build' will fetch dependencies.
This is normally skipped the next time you invoke the command, but with
Docker, there will never be a "next time" as the COPY command, provided
there are changes, will result in a new layer.

It's only necessary to pull down dependencies if they have changed,
therefore the build step is now exclusively for compiling and not
pulling down dependencies.
Run `apk add' before COPY

This commit makes `docker build' much faster by allowing the `apk add'
layer to be cached.
Replace unversioned tags

This commit replaces all the unversioned tags with specific versions as
this should be more stable and easier to debug.
Pull in dependencies when building container

Recent changes to break up the project and add tests has resulted in Dockerfile
no longer building a container. This commit changes the script to copy
everything so the internal package `socketactivation' is pulled in as well as

Additionally, `strip' from `binutils' was pulled in so the resulting binary
is smaller.
Build using Go 1.15
Add Dockerfile

Issue: https://todo.sr.ht/~ancarda/tls-redirector/6