Docker utils

Network management

Create network


> docker network create -d bridge soagg_network 
									

List networks


> docker network ls
									

Delete a network


> docker network rm soagg_network
									


Container management

List running containers


> docker container ls
> docker ps 
									

Kill a container


> docker container kill container_id
									

Stop a container


> docker container stop container_id
									

Connect to a container


> docker exec -it container_id bash
									

Copy file from host to running container


> docker cp containerId:/file/path/within/container /host/path/target
									

View container logs


> docker logs containerId
									


Images management

List local pulled images


> docker images
									

Pull image from docker hub


> docker pull repositoryname/tag
									

Delete all downloaded images


> docker rmi $(docker images -q) --force
									

Delete an image


> docker image rm imageid
									

Docker compose utils

Create and start containers


> docker-compose -f compose-file.yaml up
									

Stop containers


> docker-compose -f compose-file.yaml down
									

Create containers


> docker-compose -f compose-file.yaml up --no-start