~ancarda/tls-redirector

ref: 0d27261aedcb33bb3c21f8892d898da96efefd88 tls-redirector/Dockerfile -rw-r--r-- 353 bytes
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
go.{mod,sum}.

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
Next