This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $path = $args[0] | |
| $manifest = $args[1] | |
| (Get-ChildItem -rec $path |where {!$_.PsIsContainer}| %{$_.FullName}) -replace [regex]::Escape($path), "" | Out-File $manifest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class ContainerManifest | |
| { | |
| public ContainerManifest(string rootPath) | |
| { | |
| _rootPath = rootPath; | |
| Files = new List<string>(); | |
| TraverseDirectory(rootPath); | |
| } | |
| public override string ToString() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static IEnumerable<string> ListAllFiles(string path) | |
| { | |
| var directories = Directory.GetDirectories(path); | |
| foreach (var directory in directories) | |
| { | |
| foreach (string x in ListAllFiles(directory)) | |
| { | |
| yield return x; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace Helpers | |
| { | |
| using System; | |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using System.IO; | |
| using System.Threading.Tasks; | |
| public static class ProcessExecutor | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker inspect -f '{{range $index, $value := .Config.Env}}{{$value}} {{end}}' container_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker stats --format "table {{.Name}}\t{{.Container}}\t{{.CPUPerc}}\t{{.MemPerc}}\t{{.NetIO}}\t{{.BlockIO}}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script is for manual cleanup of the hourly sql backups generated by the sqlbackup container. | |
| # It is expected this would be run from the VM that is mounting the sqlbackup volume. | |
| DAYS=$1 | |
| if [ -z "$DAYS" ]; then | |
| echo 'USAGE: $ prunebackups.sh <number of days to keep>' | |
| echo 'Number of days must be an integer and includes today.' | |
| echo 'To wipe out every thing except today: "./prunebackups.sh 1"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker images|grep latest|awk '{print $3}'|while read line;do docker images|grep utmsp|grep -v latest|grep $line;done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # or docker exec utmsp_gw_1 nginx -s reload | |
| docker kill --signal=HUP utmsp_gw_1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cd /var/lib/docker/containers | |
| find ./ -type f -name *.log|xargs -i cp {} ~/docker-logs/ |