Skip to content

joudaon/dockers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DOCKERS

The aim of this repository is to collect useful docker-compose files with different services so that they can help other developers to ease their work.

Feel free to add your own or someone else's docker-compose files.

Don't forget to leave a ⭐ if you found this useful.

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