2021-01-20 16:55:05 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
#
|
|
|
|
# Runs `go build` with flags configured for docker distribution. All
|
|
|
|
# it does differently from `go build` is burn git commit and version
|
|
|
|
# information into the binaries inside docker, so that we can track down user
|
|
|
|
# issues.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
#
|
2021-10-12 19:27:39 +00:00
|
|
|
# WARNING: Tailscale is not yet officially supported in container
|
|
|
|
# environments, such as Docker and Kubernetes. Though it should work, we
|
|
|
|
# don't regularly test it, and we know there are some feature limitations.
|
2021-01-20 16:55:05 +00:00
|
|
|
#
|
2021-10-12 19:27:39 +00:00
|
|
|
# See current bugs tagged "containers":
|
2021-01-20 16:55:05 +00:00
|
|
|
# https://github.com/tailscale/tailscale/labels/containers
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2021-07-07 06:25:39 +00:00
|
|
|
eval $(./build_dist.sh shellvars)
|
2021-01-20 16:55:05 +00:00
|
|
|
|
2021-03-05 16:51:27 +00:00
|
|
|
docker build \
|
|
|
|
--build-arg VERSION_LONG=$VERSION_LONG \
|
|
|
|
--build-arg VERSION_SHORT=$VERSION_SHORT \
|
|
|
|
--build-arg VERSION_GIT_HASH=$VERSION_GIT_HASH \
|
2021-10-12 21:24:07 +00:00
|
|
|
-t tailscale:$VERSION_SHORT -t tailscale:latest .
|