Skip to content

amen619/dockers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOCKERS

Useful docker-compose files with different services.

TOC

Commands

Create and start containers

$> docker-compose up
$> docker-compose up -d #Detached mode: Run containers in the background, print new container names.

Stop and remove containers, networks, images, and volumes

$> docker-compose down

Execute a command in a running container

$> docker-compose exec <servicename> sh #Get into container
$> docker-compose exec <servicename> /bin/bash #Get into container
$> docker-compose exec <servicename> pwd #Run command and exit

View output from containers.

$> docker-compose logs
$> docker-compose logs -f #View output from containers.

Stop and remove all docker containers

$> docker stop $(docker ps -a -q)
$> docker rm $(docker ps -a -q)

Remove all docker images

$> docker rmi $(docker images -q)

Deleting all the volumes

Once all the containers are deleted, you can delete all the Docker volumes on your computer using the following command

$> docker volume prune

Deleting all docker data

$> docker system prune -a

Copy file from container to host

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

Working with Dockerfiles

Building an image

$> docker build -t <imagename:tag> .

Useful links:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 85.8%
  • Shell 3.7%
  • Python 3.5%
  • HTML 3.4%
  • Dockerfile 2.0%
  • Groovy 1.3%
  • Other 0.3%