Skip to content

Instantly share code, notes, and snippets.

@gcatalfamo
gcatalfamo / README.md
Created April 15, 2024 08:00 — forked from bnhf/README.md
Tailscale - Deploying with Docker and Portainer

Just thought I'd put together some detail on deploying Tailscale using Docker and Portainer. These bits-and-pieces are available elsewhere, but not together, so hopefully this will save someone a bit of time if you'd like to add Tailscale to an existing Docker install:

Here's my annotated recommended docker-compose, to use with Portainer-Stacks. Note that I'm not using a pre-made Auth Key. I started that way, but realized it was very easy to simply check the Portainer log for the tailscaled container once the stack is running. In that log you'll see the standard Auth link that you can use to authorize the container. This way you don't need to create a key in advance, or create a reusable key that introduces a security risk:

version: '3.9'
services:
  tailscale:
    image: tailscale/tailscale
    container_name: tailscaled
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@gcatalfamo
gcatalfamo / pe10.py
Created May 1, 2013 20:58
This is my attempt at Project Euler problem no.10, using the sieve of Eratosthenes. It works pretty well up to the 10^7 order of magnitude. At 10^8 it starts to slow down.
print "This program calculates the sum of all the primes below a certain number:\n"
print "Insert a number:\n"
input=raw_input()
x=int(input)
def sumprimes(x):
tot=0
n=[2]