-
Notifications
You must be signed in to change notification settings - Fork 0
Docker Help
Most of the commands need to be known are inside containers.sh
$ sudo groupadd docker
(Does not matter if the group is already added)
$ sudo gpasswd -a $USER docker
(Add yourself to the docker group)
$ sudo service docker restart
(Restart service)
IMPORTANT: Remember to log out and back in for these things to be in effect.
$ docker exec -it CONTAINER_NAME program
Where program is e.g bash/zsh/cqlsh
.
$ docker ps
$ docker ps -a
$ docker run
--name=some_name_the_container_is_differentiated
-p internal_port:external_port
-d # Run the container in detached mode. When creating it, do not have an interactive shell.
VERSION # "Cassandra", or "grafana:4.1.1" or "backend:latest"
$ docker stop NAME # Where name is the automatically created or manually chosen one.
Unsure about the name? See List containers and check the name column
Requires the container to be stopped. See stopping a container to see how.
$ docker rm NAME # Where name is the automatically created or manually chosen one.
Unsure about the name? See List containers and check the name column