docker container removal

docker container removal

$ docker container list --all
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7892a81691c6 docker/ucp "/bin/ucp-tool" 35 minutes ago Exited (0) 35 minutes ago cranky_shannon
ff848049bc55 redmine "/docker-entrypoint.…" About an hour ago Exited (0) About an hour ago inspiring_babbage
fe67ab61abda redmine "/docker-entrypoint.…" About an hour ago Exited (0) About an hour ago cocky_bartik
65a554844970 bitnami/redmine "/app-entrypoint.sh …" About an hour ago Exited (1) About an hour ago upbeat_pare

 

docker rm container

$ docker rm 4c5784e79dd9
Advertisements

docker image removal

docker image deletion and removal

get a list of images

$ docker images --all
REPOSITORY TAG IMAGE ID CREATED SIZE
laradock_nginx latest 687eb3dccec0 23 hours ago 24.4MB
laradock_php-fpm latest 9011ae1a47a5 23 hours ago 414MB
laradock_redis latest a085dd214956 24 hours ago 107MB
laradock_workspace latest 2ea822e3b905 24 hours ago 725MB
osde8info/get-started part-2 05bbc25a892f 27 hours ago 148MB
node alpine 785e257485e7 4 days ago 68.4MB
bitnami/redmine latest e547bec0c9bb 7 days ago 708MB
postgres alpine f4f4231d6f0b 10 days ago 39.5MB

delete a specific image

$ docker image rm f4f4231d6f0b

docker images are kept in /var/lib/docker

docker images are kept in /var/lib/docker

# du -s /var/lib/docker/*
20    /var/lib/docker/builder
220   /var/lib/docker/containerd
884   /var/lib/docker/containers
30028 /var/lib/docker/image
84    /var/lib/docker/network
5876620 /var/lib/docker/overlay2
20    /var/lib/docker/plugins
4     /var/lib/docker/runtimes
4     /var/lib/docker/swarm
4     /var/lib/docker/tmp
4     /var/lib/docker/trust
188   /var/lib/docker/volumes

you can save a lot of space by deleting any unused images and containers

# du -s /var/lib/docker/*
20	/var/lib/docker/builder
220	/var/lib/docker/containerd
4	/var/lib/docker/containers
2888	/var/lib/docker/image
84	/var/lib/docker/network
163380	/var/lib/docker/overlay2
20	/var/lib/docker/plugins
4	/var/lib/docker/runtimes
4	/var/lib/docker/swarm
4	/var/lib/docker/tmp
4	/var/lib/docker/trust
188	/var/lib/docker/volumes

docker compose docker-compose.yaml

docker compose runs all the containers (and dependancies) defined in your docker-compose.yaml file

for example

$ docker-compose up -d nginx

actually runs the nginx, phpfpm and wordspaces because the docker-compose.yaml contains depends on

### NGINX Server Container ##################################

nginx:
 build:
 context: ./nginx
 args:
 - PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
 - PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
 volumes_from:
 - applications
 volumes:
 - ${NGINX_HOST_LOG_PATH}:/var/log/nginx
 - ${NGINX_SITES_PATH}:/etc/nginx/sites-available
 ports:
 - "${NGINX_HOST_HTTP_PORT}:80"
 - "${NGINX_HOST_HTTPS_PORT}:443"
 depends_on:
 - php-fpm
 networks:
 - frontend
 - backend




### PHP-FPM Container #######################################

php-fpm:
 build:
 context: ./php-fpm
 args:
 - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}

expose:
 - "9000"
 depends_on:
 - workspace
 extra_hosts:
 - "dockerhost:${DOCKER_HOST_IP}"
 environment:
 - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
 networks:
 - backend




### Workspace Utilities Container ###########################

workspace:
 build:
 context: ./workspace
 args:
 - INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
 - INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
 - INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
 - INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
 - INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP}

 

docker redmine container

if you want to run a docker redmine container you will find plenty to choose from including ones from @bitnami and @turnkeylinux

 

$ docker search redmine
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
redmine Redmine is a flexible project management web… 532 [OK] 
sameersbn/redmine 268 [OK]
bitnami/redmine Bitnami Docker Image for Redmine 26 [OK]
74th/redmine-all-in-one Redmine includes hosting SVN & Git , backlog… 9 [OK]
inspiredgeek/redmine-alpine Simple Docker images to run Redmine tracker … 4 [OK]
turnkeylinux/redmine-13.0 TurnKey Redmine - Integrated SCM & Project M… 2 
eeacms/redmine EEA Redmine docker setup 2 [OK]
tkeydll/docker-redmine-backlogs Redmine with backlogs plugin. 1 [OK]
fjudith/redmine Dockerized Redmine based on redmine:3.3 offi… 1 [OK]
themill/redmine fork for redmine to add/test theming 1 [OK]
minimaru/openshift-redmine A Debian8 based Redmine v3.2 image for use w… 1 
commonms/redmine Docker image for Redmine. 1 [OK]
starfox/redmine-plugin-dashboard A container designed to install redmine-dash… 1 [OK]
trollin/redmine 0 
honsiorovskyi/redmine Official Redmine + Git + Mercurial 0 [OK]
rubykube/redmine Redmine 4.0 container 0 [OK]
thiagorider/redmine Redmine Docker Image Automated Build Repo. 0 [OK]
sorintdev/redmine Redmine with custom theme 0 
nitra/redmine_priority_tasks redmine_priority_tasks 0 [OK]
togent2/redmine_ttdlx_enabled redmine_ttdlx_enabled 0 [OK]
mikroways/redmine redmine passenger image 0 [OK]
akiko/docker-for-redmine-plugin-test Docker to run redmine’s plugin test. 0 [OK]
amd64/redmine Redmine is a flexible project management web… 0 
robobeerun/redmine Redmine image that runs as non-privileged us… 0 [OK]