Skip to content

Commit 189cd38

Browse files
authored
Merge pull request #3 from tailscale/binaries
Dockerfile: download release binaries.
2 parents c630373 + 2776593 commit 189cd38

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

.devcontainer/Dockerfile

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,20 @@
44

55
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux as builder
66
USER root
7-
8-
# Magic DNS in a container where /etc/resolv.conf is a bind mount needed
9-
# extra support, currently on a development branch.
10-
WORKDIR /go/src/tailscale
7+
WORKDIR /app
118
COPY . ./
12-
RUN git clone https://github.com/tailscale/tailscale.git && cd tailscale && \
13-
go mod download && \
14-
go install -mod=readonly ./cmd/tailscaled ./cmd/tailscale
9+
ENV TSFILE=tailscale_1.26.1_amd64.tgz
10+
RUN mkdir -p binaries && \
11+
wget https://pkgs.tailscale.com/stable/${TSFILE} && \
12+
tar xzf ${TSFILE} --strip-components=1 -C binaries
1513
COPY . ./
1614

1715
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux
1816
USER root
1917

2018
RUN apt-get update && apt-get install -y curl gpg dnsutils
21-
COPY tailscaled /etc/init.d
22-
COPY --from=builder /go/bin/tailscaled /usr/sbin/tailscaled
23-
COPY --from=builder /go/bin/tailscale /usr/bin/tailscale
19+
COPY tailscaled /etc/init.d/tailscaled
20+
COPY --from=builder /app/binaries/tailscaled /usr/sbin/tailscaled
21+
COPY --from=builder /app/binaries/tailscale /usr/bin/tailscale
2422

2523
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale

0 commit comments

Comments
 (0)