Skip to content

Commit

Permalink
Add housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanScherer committed Oct 3, 2018
1 parent d049ef0 commit 8f0dc49
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions 4-portainer/housekeeping/cleanup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
docker kill $(docker ps -q)
docker rm $(docker ps -qa)
docker rmi chocolateyfest/appetizer:1.0.0
docker rmi chocolateyfest/appetizer:1.1.0
docker rmi chocolateyfest/chocolatey:latest
docker rmi chocolateyfest/node:latest
docker rmi chocolateyfest/node:pure
docker rmi chocolateyfest/node:runtime
docker rmi chocolateyfest/portainer:latest
docker system prune -f
11 changes: 11 additions & 0 deletions 4-portainer/housekeeping/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"psFormat": "table {{.ID}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}",
"imagesFormat": "table {{.Repository}}:{{.Tag}}\\t{{.Size}}",
"pluginsFormat": "table {{.ID}}\t{{.Name}}\t{{.Enabled}}",
"statsFormat": "table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}",
"serviceInspectFormat": "pretty",
"servicesFormat": "table {{.ID}}\t{{.Name}}\t{{.Mode}}\t{{.Replicas}}\t{{.Ports}}",
"secretFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"configFormat": "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}",
"nodesFormat": "table {{.ID}}\t{{.Hostname}}\t{{.Availability}}\t{{.ManagerStatus}}"
}
2 changes: 2 additions & 0 deletions 4-portainer/housekeeping/init.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdir $env:USERPROFILE\.docker
copy config.json $env:USERPROFILE\.docker

0 comments on commit 8f0dc49

Please sign in to comment.