Skip to content

tmate server on alpine linux inside of a docker container

Notifications You must be signed in to change notification settings

adamenger/tmate-docker-alpine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmate server on Alpine Linux

Pairing is caring - Aldous Huxley

This repo is an attempt to build a pairing server using tmate and Alpine Linux. My main goal is to increase the amount of pairing teams do amongst each other. My implementation takes advantage of multi-stage container builds and Alpines awesomeness to generate container images just under 60MB. The other implementations of Tmate and Docker use Ubuntu as a base layer which produces containers upwards of 250MB+. I've tried to collate the tmate + docker approaches here, and have added a few other scripts + examples to make deploying tmate (and pairing) easier.

Running

Mounting your keys

I didn't like how other implementations of tmate + docker cached the server keys into the docker container. This implementation will generate them when the container starts if they don't exist, and will use existing ones if it finds them. For this to work, you'll have to mount a volume into the container at /etc/tmate-keys so that your keys remain persistent through container restarts.

Native docker

$ docker run --privileged -v tmate-keys:/etc/tmate-keys -e PORT=2222 -e HOST=127.0.0.1 -p 2222:2222 atomenger/tmate-docker:latest

Docker compose

See examples/docker-compose

Kubernetes

See examples/kubernetes

ECS

TODO

Digital Ocean

See examples/digitalocean

what's backtrace.patch ??

Yes, Alpine Linux is missing backtrace and a few other constants from libbacktrace. To get around this, we patch out the use of it in tmate using backtrace.patch. See this link for more information and please feel free to correct me if my understanding of this is off.

I thank sigma for this patch and all other prior implementations of tmate on docker that I relied on.

About

tmate server on alpine linux inside of a docker container

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published