All Projects → OverTheWireOrg → docker-tcp-switchboard

OverTheWireOrg / docker-tcp-switchboard

Licence: other
Launch a fresh docker container per SSH connection

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to docker-tcp-switchboard

kanban-board
Single-click full-stack application (Postgres, Spring Boot & Angular) using Docker Compose
Stars: ✭ 138 (+213.64%)
Mutual labels:  docker-container
searchhub
Fusion demo app searching open-source project data from the Apache Software Foundation
Stars: ✭ 42 (-4.55%)
Mutual labels:  docker-container
campaign-manager
The Camapign Management UI for RTB4Free, the open source bidder / DSP.
Stars: ✭ 24 (-45.45%)
Mutual labels:  docker-container
cqfd
cqfd helps running commands inside the Docker container configured for your project, keeping the user and working directory the same inside the container
Stars: ✭ 48 (+9.09%)
Mutual labels:  docker-container
docker-tar1090
Multi-arch tar1090 container for visualising ADSB data
Stars: ✭ 31 (-29.55%)
Mutual labels:  docker-container
nightly-docker-rebuild
Use nightli.es 🌔 to rebuild N docker 🐋 images 📦 on hub.docker.com
Stars: ✭ 13 (-70.45%)
Mutual labels:  docker-container
standalone-docker-sailpoint-iiq
A simple way to deploy SailPoint's IdentityIQ into a series of docker containers mimicking the core components of most development environments allowing organizations to get new development team members up on their baseline code in minutes.
Stars: ✭ 33 (-25%)
Mutual labels:  docker-container
docker-phpdev
Easy to use php docker development environment setup with vhost/multi version support
Stars: ✭ 75 (+70.45%)
Mutual labels:  docker-container
docker-radarbox
AirNav RadarBox rbfeeder, multi-architecture (x86_64, arm32v7, arm64)
Stars: ✭ 26 (-40.91%)
Mutual labels:  docker-container
raspap-docker
A community-led docker container for RaspAP
Stars: ✭ 45 (+2.27%)
Mutual labels:  docker-container
baseimage-amzn
A minimal Docker Base Image based on Amazon Linux
Stars: ✭ 38 (-13.64%)
Mutual labels:  docker-container
convert-document
A docker container for LibreOffice and unoconv, used to generate PDF files from office-type documents.
Stars: ✭ 53 (+20.45%)
Mutual labels:  docker-container
xen-orchestra-docker
Xen Orchestra in a docker container
Stars: ✭ 53 (+20.45%)
Mutual labels:  docker-container
docker-routeros
Mikrotik RouterOS inside Docker container
Stars: ✭ 225 (+411.36%)
Mutual labels:  docker-container
EA-Tester
🐳📈 Headless Forex backtesting for MetaTrader platform using Docker
Stars: ✭ 77 (+75%)
Mutual labels:  docker-container
pojde
Develop from any device with a browser.
Stars: ✭ 60 (+36.36%)
Mutual labels:  docker-container
docker-flightradar24
Multi-architecture docker container running flightradar24 fr24feed. Designed to work in tandem with mikenye/readsb (arm32v7/arm64/x86_64).
Stars: ✭ 71 (+61.36%)
Mutual labels:  docker-container
hot-reload
Hot reload development for Go
Stars: ✭ 72 (+63.64%)
Mutual labels:  docker-container
essex
Essex - Boilerplate for Docker Based Projects
Stars: ✭ 32 (-27.27%)
Mutual labels:  docker-container
onionize-docker
Tor v3 onion services (hidden services) for Docker containers
Stars: ✭ 61 (+38.64%)
Mutual labels:  docker-container

Docker TCP Switchboard

Build Status

This project is part of OverTheWire's infrastructure and used to provide players of OverTheWire wargames with a fresh Docker container each time they log into SSH.

At this point in time, docker-tcp-switchboard only really supports SSH instead of arbitrary TCP connections, since it makes a connection to the backend and expects to receive a banner in order to determine that the Docker containers has started up successfully.

Some features, current and future:

  • Allocate a new Docker instance per connection
  • Ability to reuse Docker instances for multiple connections.
  • Ability to limit the amount of running containers to avoid resource exhaustion.
  • [future] Ability to set quota (time-limit, network traffic limit) per container.
  • [future] Ability to delay network communication for incoming connections, to prevent that a flood of incoming connections spawns of a flood of containers that overwhelm the Docker host.

Quickstart

Attention: This is just a quick-start and not suitable for production.

Prerequisites:

  • A docker image of your choice is needed
    • The image requires a running ssh-server and a known user/password (See \example\Dockerfile for a simple example)
  • root or root-privileges are needed for setup
# start in your home directory
cd ~
# clone this repository
git clone https://github.com/OverTheWireOrg/docker-tcp-switchboard.git
# install and start docker. You'll be able to control docker without root
sudo apt-get -y install docker-ce
sudo service docker start
sudo usermod -a -G docker **yourusername**
# install requirements
cd /docker-tcp-switchboard
sudo apt install python3-pip
pip3 install -r requirements.txt
# setup logfile
touch /var/log/docker-tcp-switchboard.log
chmod a+w /var/log/docker-tcp-switchboard.log
# create the configuration file
vi /etc/docker-tcp-switchboard.conf #paste your configuration file here (see below)
# start docker-tcp-switchboard. It'll run in the foreground.
python3 docker-tcp-switchboard.py

Done! Now connect to your outerport to start a fresh container.

Example configuration file

[global]
logfile = /var/log/docker-tcp-switchboard.log
loglevel = DEBUG

[profile:firstcontainer]
innerport = 22
outerport = 32768
container = imagename
limit = 10
reuse = false

[profile:differentcontainer]
innerport = 22
outerport = 32769
container = differentimagename
limit = 5
reuse = false

[dockeroptions:differentcontainer]
ports={"8808/tcp":null}
volumes={"/home/ubuntu/mountthisfolder/": {"bind": "/mnd/folderincointainer/", "mode": "rw"}}

misc

  • See logfile for debugging (tail -f /var/log/docker-tcp-switchboard.log)
  • To auto-disconnect when idle, use SSHD config options "ClientAliveInterval" and "ServerAliveCountMax"
  • Remember to unblock "outerport" in your firewall
  • See Docker SDK for Python for troubleshooting and available dockeroptions
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].