technique:tips:start

Modifier le fichier ~/.ssh/config de telle sorte a créer ses entrées personnalisées pour les connections ssh.

Par exemple, completer le fichier avec:

Host pica1
Hostname pica01.picasoft.net
Port 22
User root
IdentityFile ~/.ssh/id_rsa

Host pica2
Hostname pica02.picasoft.net
Port 22
User root
IdentityFile ~/.ssh/id_rsa

permet de faire ssh pica1 au lieu de ssh root@pica01.picasoft.net

:!:A ENRICHIR LE PLUS POSSIBLE !

Certaines commandes docker sont très pratiques et relativement complexes a mémorisées. De ce fait, voici un ensemble d’alias a ajouter a vos fichiers de configuration de terminaux :)

function dockerhelp {
   echo 'Delete containers with same pattern in the name (typical use when a docker service fails which creates a lot of containers on the daemon):'
   echo 'docker ps -a | grep "<pattern>" | awk '"'"'{print $1}'"'"' | xargs docker rm'
   echo '                                            |_ group to capture and print. Here we keep the ID of the container'
   echo '-----------------------------------------------------------------------'
   echo 'Delete untagged images:'
   echo 'docker rmi $(docker images -a | grep "^<none>" | awk '"'"'{print $3}'"'"')'
   echo '-----------------------------------------------------------------------'
   echo 'Delete all stopped containers:'
   echo 'docker rm $(docker ps -a -q)'
   echo '-----------------------------------------------------------------------'
   echo 'Know the file log of a container'
   echo "docker inspect --format='{{.LogPath}}' containerName"
   echo '-----------------------------------------------------------------------'
   echo 'Access to the docker virtual machine's file system on Mac'
   echo 'screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty'
}
  • technique/tips/start.1497527345.txt.gz
  • (modification externe)