Posted On July 11, 2019

Docker: Update Startup Policy for Running Containers

kimconnect 0 comments
blog.KimConnect.com >> Virtualization >> Docker: Update Startup Policy for Running Containers
# Update only 1 container by name (instead of ID)
docker update --restart=always kimconnect
# View existing container IDs
docker ps -q
6c65da0f8c1d
4a91a766b3db
f9b235680fa2
# View containers by names and statuses
docker ps --all --format "table {{.Names}}\t{{.Status}}\t{{.RunningFor}}"
NAMES STATUS CREATED
shellinabox Exited (137) 18 minutes ago 4 weeks ago
kimconnect Up 17 minutes 3 months ago
openproject Exited (137) 4 weeks ago 4 months ago
mysql-server Up 23 minutes (healthy) 4 months ago
blog Exited (0) 4 weeks ago 4 months ago
alpine Exited (137) 4 months ago 4 months ago
portainer Up 23 minutes 4 months ago
# Update restart policies for all currently running containers
docker update --restart=always $(docker ps -q)
6c65da0f8c1d
4a91a766b3db
f9b235680fa2

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

Hyper-V: Clone Linux Guest VM

There are two methods of cloning an existing guest VM: Templating and Copying. Templating has…

Docker DRUPAL Container

# Preseed drupal files with persitent storagemkdir /var/www/html/kimconnect/{modules,profiles,sites,themes}docker run --rm drupal tar -cC /var/www/html/sites .…

Hyper-V: De-register Storage File Share and/or Removing Paths from VMM

# vmmDeregisterFileSharePath.ps1 $pathSearch='\\DECOMMISSIONED-FILESHARE008' $unregister=$true $remove=$false $fileShares=Get-SCStorageFileShare|?{$_.SharePath -like "*$pathSearch*"} $thisLibraryServer = Get-SCLibraryServer if($unregister){$fileShares|%{Unregister-SCStorageFileShare -StorageFileShare $_ -LibraryServer…
Other project: DragonCoin.com