Last active
August 29, 2015 14:26
-
-
Save juanpasolano/ab41d608f9c1c07fd796 to your computer and use it in GitHub Desktop.
Docker stuff
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
# Install docker | |
wget -qO- https://get.docker.com | sh | |
# Add user to the docker group (restart the server after) | |
sudo usermod -aG docker <user> | |
# Run docker container and login | |
# The -i flag tells docker container to connect to STDIN on the container | |
# The -t flag specifies to get a pseudo-terminal | |
# Note: you need to run a terminal process as your command (eg /bin/bash) | |
docker run -i -t ubuntu /bin/bash | |
# List containers (anly runing containes) | |
docker ps | |
# List containres that were runing and were shutdown | |
socker ps -a | |
# Add a user (linux) | |
adduser <user> | |
# add user into the sudo group so dont need to sudo everything | |
adduser <user> sudo | |
# change to that user | |
su <user> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment