docker stop $(docker ps -qa) && docker rm $(docker ps -qa) && docker rmi -f $(docker images -qa) && docker volume rm $(docker volume ls -q) && docker network rm $(docker network ls -q)
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
# /etc/network/interfaces | |
# | |
auto lo | |
iface lo inet loopback | |
# device: eth0 | |
iface eth0 inet manual | |
# IPv4 bridge | |
# (connect ONLY your firewall/router KVM instance here, this is the WAN device!) |
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
Первый шаг, получить список разделов в образе: | |
fdisk -l hive-0.5-12-20171211.img | |
Диск hive-0.5-12-20171211.img: 7 GiB, 7549747200 байтов, 14745600 секторов | |
Единицы измерения: секторов из 1 * 512 = 512 байтов | |
Размер сектора (логический/физический): 512 байт / 512 байт | |
I/O size (minimum/optimal): 512 bytes / 512 bytes | |
Тип метки диска: dos | |
Идентификатор диска: 0x244b7fbe |
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
/ ip address | |
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=LAN | |
add address=10.111.0.2/24 network=10.111.0.0 broadcast=10.111.0.255 interface=ISP1 | |
add address=10.112.0.2/24 network=10.112.0.0 broadcast=10.112.0.255 interface=ISP2 | |
/ ip firewall mangle | |
add chain=prerouting dst-address=10.111.0.0/24 action=accept in-interface=LAN | |
add chain=prerouting dst-address=10.112.0.0/24 action=accept in-interface=LAN | |
add chain=prerouting in-interface=ISP1 connection-mark=no-mark action=mark-connection \ | |
new-connection-mark=ISP1_conn |
Requirement
- USB flash drive - this is where the container filesystem will be persisted
Set-up docker bridge network
/interface bridge add name=docker
Set-up veth
to be used by container
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
# <SRCUSER> <SRCPW> <DSTUSER> <DSTPW> |
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
# remove | |
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist | |
# restore | |
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist |
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
# shell command: | |
pg_dump <db_name> -U <db_user> -h <db_host> | gzip | curl -u <ftp_user>:<ftp_password> ftp://<ftp_host>/`date '+%Y-%m-%d_%H-%M'`/db_backup.sql.gz --ftp-create-dirs -T - | |
# if you want to execute it through cron, be sure to escape all %! | |
# for crontab: | |
pg_dump <db_name> -U <db_user> -h <db_host> | gzip | curl -u <ftp_user>:<ftp_password> ftp://<ftp_host>/`date '+\%Y-\%m-\%d_\%H-\%M'`/db_backup.sql.gz --ftp-create-dirs -T - |
NewerOlder