Created
July 25, 2017 20:26
-
-
Save jonathanpeppers/99f3543d675ade90272479e454049555 to your computer and use it in GitHub Desktop.
Full script to SSH tunnel and run a docker iamge
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 characters
#!/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