Skip to content

Commit 322a160

Browse files
authored
Merge pull request #2 from tailscale/build
build tailscale from source.
2 parents 6254c35 + 864679a commit 322a160

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22
# Use of this source code is governed by a BSD-style
33
# license that can be found in the LICENSE file.
44

5-
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux
5+
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux as builder
6+
USER root
7+
8+
WORKDIR /go/src/tailscale
9+
COPY . ./
10+
RUN git clone https://github.com/tailscale/tailscale.git && cd tailscale && \
11+
git checkout dgentry/dns-copy && go mod download && \
12+
go install -mod=readonly ./cmd/tailscaled ./cmd/tailscale
13+
COPY . ./
614

15+
FROM mcr.microsoft.com/vscode/devcontainers/universal:linux
716
USER root
817

918
COPY tailscaled /etc/init.d
19+
COPY --from=builder /go/bin/tailscaled /usr/sbin/tailscaled
20+
COPY --from=builder /go/bin/tailscale /usr/bin/tailscale
1021

11-
RUN apt update && apt install -y curl gpg
12-
13-
RUN curl https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | apt-key add
14-
RUN curl https://pkgs.tailscale.com/stable/ubuntu/focal.list | tee /etc/apt/sources.list.d/tailscale.list
15-
RUN apt update && \
16-
export DEBIAN_FRONTEND=noninteractive && \
17-
apt -y install --no-install-recommends tailscale
1822
RUN mkdir -p /var/run/tailscale /var/cache/tailscale /var/lib/tailscale

0 commit comments

Comments
 (0)