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
| redis-cli --raw keys "$PATTERN" | xargs redis-cli del |
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
| ps f -eo pid,uid,gid,user,pgrp,command |
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
| certains réseaux bloquent en effet les requetes DNS extérieures et force leur DNS. Dans ce cas il faut spécifier le dns "local" | |
| some networks prevent using external dns (google, etc.), and force the use of their dns. | |
| With docker, depending on network config, one need to specify on command-line the used dns. | |
| docker run ... --dns a.b.c.d .... | |
| Local dns info can be found with: | |
| nmcli dev show | grep DNS |
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
| for i in $(docker ps -aq) | |
| do | |
| echo -n "Volumes for ${i}: " | |
| docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' ${i} | |
| 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
| sudo docker run --rm -d -p 1025:1025 -p 8025:8025 mailhog/mailhog | |
| configure smtp client to send to port 1025 | |
| web ui on port 8025 |
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
| apt-get install $(grep -vE "^\s*#" filename | tr "\n" " ") |
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
| To send dcut command to delete uploaded packages | |
| dcut rm -f x.y.changes |
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
| to launch agent on same node than server add --link | |
| docker run --link happy_meninsky:dockerdevng.genouest.org -e CATTLE_AGENT_IP="dockerdevng.genouest.org" -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v1.0.1 http://dockerdevng.genouest.org:8080/v1/scripts/TOKEN |
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
| # Switch to the master branch and make sure you are up to date. | |
| git checkout master | |
| git fetch # this may be necessary (depending on your git config) to receive updates on origin/master | |
| git pull | |
| # Merge the feature branch into the master branch. | |
| git merge feature_branch | |
| # Reset the master branch to origin's state. | |
| git reset origin/master # or commit id |
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
| from docker import Client | |
| import datetime | |
| import time | |
| import logging | |
| from subprocess import Popen, PIPE | |
| today = datetime.datetime.now() | |
| timestamp = time.mktime(today.timetuple()) | |
| cli = Client(base_url='unix://var/run/docker.sock') |