This file contains 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
### debian 8 (jessie) | |
mkdir /etc/systemd/system/[email protected] &&\ | |
echo '[Service] | |
Environment="TERM=xterm"' > /etc/systemd/system/[email protected]/xterm.conf | |
systemctl daemon-reload &&\ | |
systemctl enable [email protected] &&\ | |
systemctl start [email protected] &&\ | |
systemctl status [email protected] |
This file contains 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
version: "2" | |
services: | |
app1: | |
image: alpine:latest | |
command: ping app2 | |
networks: | |
- discovery-demo | |
app2: | |
image: alpine:latest |
This file contains 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
for i in $(docker ps -aq) | |
do | |
echo -n "Volumes for ${i}: " | |
docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' ${i} | |
done |
This file contains 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 | |
# get a list of all running containers by name | |
for CONTAINER_NAME in $(docker ps --filter status=running --format '{{ .Names }}') | |
do | |
# get a list of the processes running in the container where the process is running as root | |
ROOT_PROCESSES="$(docker top ${CONTAINER_NAME} -o user,pid,ppid,command -U root -u root)" | |
# check and see if there are processes running as root; if not, do not display anything | |
if [ "$(echo "${ROOT_PROCESSES}" | grep ^root &>/dev/null; echo $?)" -eq "0" ] |
This file contains 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 | |
# create directory for bundle in persistent storage | |
cd /var/lib/jenkins | |
mkdir ucp-bundle | |
cd ucp-bundle | |
set -e | |
# set variables for getting client bundle |
This file contains 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
# from https://github.com/Microsoft/Virtualization-Documentation/blob/live/windows-server-container-tools/Debug-ContainerHost/Debug-ContainerHost.ps1#L175 | |
Write-Output "Warnings & errors from the last 24 hours" | |
$logStartTime = (Get-Date).AddHours(-24) | |
$logNames = "Microsoft-Windows-Containers-Wcifs/Operational", | |
"Microsoft-Windows-Containers-Wcnfs/Operational", | |
"Microsoft-Windows-Hyper-V-Compute-Admin", | |
"Microsoft-Windows-Hyper-V-Compute-Operational", | |
"Application" | |
$levels = 3,2,1,0 |
This file contains 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
### set environment variables | |
DTR_URL="ddcbeta.mac" | |
# Make sure you have downloaded DTR's CA (if the certs are not trusted by valid root CA on your client already) and are placed in the path specified by --tlscacert | |
# The DTR's CA cert can be downloaded from https://${DTR_URL}/ca | |
# If it is already trusted, you can leave of the --tlscacert argument | |
alias notary="notary -s https://${DTR_URL} -d ~/.docker/trust --tlscacert ~/.docker/tls/${DTR_URL}/ca.crt" | |
REPO="admin/signtest" | |
USERNAME="admin" | |
### admin |
This file contains 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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
This file contains 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 | |
PIPE1=/run/dss-$$-fifo1 | |
PIPE2=/run/dss-$$-fifo2 | |
TEMPDIR=$(mktemp --tmpdir -d) | |
platform_supports_deferred_deletion() { | |
local deferred_deletion_supported=1 | |
trap cleanup_pipes EXIT | |
if [ ! -x "./dss-child-read-write.sh" ];then |