Last active
December 15, 2023 11:34
-
-
Save hamishforbes/2ac7ae9d7ea47cad4e3a813c9b45c10f to your computer and use it in GitHub Desktop.
Revisions
-
hamishforbes revised this gist
Jun 25, 2020 . 3 changed files with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ FROM alpine:3.11 AS build ARG CHANNEL=unstable ARG VERSION=0.99.1-127 ARG ARCH=amd64 RUN mkdir /build This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,7 @@ # Create the tun device path if required if [ ! -d /dev/net ]; then mkdir /dev/net; fi if [ ! -e /dev/net/tun ]; then mknod /dev/net/tun c 10 200; fi # Wait 5s for the daemon to start and then run tailscale up to configure /bin/sh -c "sleep 5; tailscale up --authkey=${TAILSCALE_AUTH} -advertise-tags=${TAILSCALE_TAGS}" & exec /usr/bin/tailscaled --state=/tailscale/tailscaled.state This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,7 +19,6 @@ controller: - name: TAILSCALE_TAGS value: "tag:dev" securityContext: capabilities: add: - NET_ADMIN -
hamishforbes created this gist
Jun 24, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ FROM alpine:3.11 AS build ARG CHANNEL=unstable ARG VERSION=0.99.1-0 ARG ARCH=amd64 RUN mkdir /build WORKDIR /build RUN apk add --no-cache curl tar RUN curl -vsLo tailscale.tar.gz "https://pkgs.tailscale.com/${CHANNEL}/tailscale_${VERSION}_${ARCH}.tgz" && \ tar xvf tailscale.tar.gz && \ mv "tailscale_${VERSION}_${ARCH}/tailscaled" . && \ mv "tailscale_${VERSION}_${ARCH}/tailscale" . FROM alpine:3.11 # Tailscaled depends on iptables (for now) RUN apk add --no-cache iptables COPY --from=build /build/tailscale /usr/bin/ COPY --from=build /build/tailscaled /usr/bin/ COPY entrypoint.sh /entrypoint.sh ENTRYPOINT ["/bin/sh", "/entrypoint.sh"] This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ # Wait 5s for the daemon to start and then run tailscale up to configure /bin/sh -c "sleep 5; tailscale up --authkey=${TAILSCALE_AUTH} -advertise-tags=${TAILSCALE_TAGS}" & exec /usr/bin/tailscaled --state=/tailscale/tailscaled.state This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ controller: extraVolumes: - name: tailscale-state persistentVolumeClaim: claimName: tailscale-nginx-ingress-state extraContainers: - name: nginx-ingress-tailscaled image: **********.dkr.ecr.eu-west-1.amazonaws.com/tailscale imagePullPolicy: Always volumeMounts: - name: tailscale-state mountPath: /tailscale env: - name: TAILSCALE_AUTH valueFrom: secretKeyRef: name: tailscale key: auth_key - name: TAILSCALE_TAGS value: "tag:dev" securityContext: privileged: true capabilities: add: - NET_ADMIN