Skip to content

Instantly share code, notes, and snippets.

@jonathanpeppers
Created July 25, 2017 20:26
Show Gist options
  • Save jonathanpeppers/99f3543d675ade90272479e454049555 to your computer and use it in GitHub Desktop.
Save jonathanpeppers/99f3543d675ade90272479e454049555 to your computer and use it in GitHub Desktop.
Full script to SSH tunnel and run a docker iamge
#!/bin/bash
# Connect to remote Docker VM
ssh -fNL 2375:localhost:2375 [email protected] -i keys/nukkit
export DOCKER_HOST=:2375
# Just to verify we connected (and to the right machine)
docker info
# Run docker image
docker rm nukkit
docker volume create --name worlds
docker volume create --name logs
docker volume create --name players
docker volume create --name plugins
docker run -it -p 19132:19132/udp --name nukkit -v worlds:/home/worlds -v players:/home/players -v logs:/home/logs -v plugins:/home/plugins nukkit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment