Docker version 18.09.6, build 481bc77
List images docker images
List containers docker ps -a
Remove containers docker rm <container_id>
Create network docker network create <network_name> --driver=bridge
Enter docker exec -it /bin/bash
from itertools import zip_longest | |
def grouper(iterable, n=1000, fillvalue=None): | |
args = [iter(iterable)] * n | |
return zip_longest(*args, fillvalue=fillvalue) |
def chunks(l, n): | |
for i in range(0, len(l), n): | |
yield l[i:i+n] |
def check_pid(pid): | |
try: | |
os.kill(pid, 0) | |
except OSError: | |
return False | |
else: | |
return True | |
pid = None | |
try: |
import logging | |
logging.basicConfig( | |
format='%(asctime)s - %(levelname)s - %(message)s', | |
level=logging.INFO, | |
handlers=[ | |
logging.StreamHandler(), | |
logging.FileHandler("filename.log"), | |
] | |
) |
function __completeSSHHosts { | |
COMPREPLY=() | |
local currentWord=${COMP_WORDS[COMP_CWORD]} | |
local completeHosts=$( | |
cat "$HOME/.ssh/config" | \ | |
grep --extended-regexp "^Host +([^* ]+ +)*[^* ]+ *$" | \ | |
tr -s " " | \ | |
sed -E "s/^Host +//" | |
) |
# | |
# This file MUST be edited with the 'visudo' command as root. | |
# | |
# Please consider adding local content in /etc/sudoers.d/ instead of | |
# directly modifying this file. | |
# | |
# See the man page for details on how to write a sudoers file. | |
# | |
Defaults env_reset | |
Defaults mail_badpass |
I hereby claim:
To claim this, I am signing this object: