Skip to content

Instantly share code, notes, and snippets.

@juanpasolano
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpasolano/ab41d608f9c1c07fd796 to your computer and use it in GitHub Desktop.
Save juanpasolano/ab41d608f9c1c07fd796 to your computer and use it in GitHub Desktop.
Docker stuff
# 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