title | subtitle | author | date | source |
---|---|---|---|---|
Docker Compose Cheatsheet |
Quick reference for Docker Compose commands and config files |
Jon LaBelle |
April 7, 2019 |
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: "3.8" | |
services: | |
jenkins-docker: | |
image: docker:dind | |
restart: always | |
privileged: "true" | |
environment: | |
- DOCKER_TLS_CERTDIR=/certs | |
ports: | |
- "2376:2376" |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
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
cd ~ | |
apt install -y python3-pip gcc make autoconf automake git python3-pip python3-requests \ | |
python3-mock gettext pkgconf xsltproc python3-dev pep8 pyflakes python3-yaml systemd \ | |
logrotate python3-psutil python3-ldap python3-lxml python3-websockify python3-jsonschema \ | |
openssl nginx python3-cherrypy3 python3-pam python-m2crypto gettext python3-openssl \ | |
python3-configobj python3-lxml python3-magic python3-paramiko python3-ldap spice-html5 \ | |
novnc qemu-kvm python3-libvirt python3-parted python3-guestfs python3-pil python3-cherrypy3 \ | |
libvirt0 libvirt-daemon-system libvirt-clients nfs-common sosreport open-iscsi libguestfs-tools \ | |
libnl-route-3-dev |
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 Indonesian server | |
#locale fix | |
sudo locale-gen id_ID.UTF-8 | |
#change miror | |
sudo sed -i_old 's/archive.ubuntu.com/kambing.ui.ac.id/' /etc/apt/sources.list | |
sudo apt update | |
#INSTALL WOK | |
#build depencies |
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
rsync --archive --compress --partial --append --delete --numeric-ids \ | |
--exclude=/rootfs/cdrom/* --exclude=/rootfs/dev/* --exclude=/rootfs/media/* --exclude=rootfs/mnt/* \ | |
--exclude=/rootfs/proc/* --exclude=/rootfs/run/* --exclude=/rootfs/sys/* --exclude=/rootfs/tmp/* \ | |
/var/lib/lxc/${container}/ user@desthost:/var/lib/lxc/${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
#!/bin/bash | |
echo "Building extended du reports for $1 in $2 ..."; | |
cd $1 | |
du -sh $1/* $1/.[a-zA-Z0-9]* $1/. > $2/du-output.txt | |
cat $2/du-output.txt | egrep '([0-9]M)' > $2/du-output-MB.txt | |
cat $2/du-output.txt | egrep '[0-9]G'> $2/du-output-GB.txt | |
cat $2/du-output-MB.txt | sort -hr > $2/du-output-MB-sorted.txt | |
cat $2/du-output-GB.txt | sort -hr > $2/du-output-GB-sorted.txt | |
echo "" | |
echo '[du extended report]:'; |
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
# Optimized MySQL configuration by Fotis Evangelou - Updated July 2017 | |
# | |
# The settings provided below are a starting point for a 4GB - 8GB RAM server with 4 CPU cores. | |
# If you have less or more resources available you should adjust accordingly to save CPU, | |
# RAM and disk I/O usage. | |
# The settings marked with a specific comment or the word "UPD" after the value | |
# should be adjusted for your system by using MySQL DB diagnostics tools like: | |
# http://mysqltuner.com/ | |
# or | |
# https://launchpad.net/mysql-tuning-primer (supports MySQL up to v5.6) |
##useradd komutu.
-c
"açıklama"
ex:
-c "müdür bey"
-s
kabukı-adı
ex:
NewerOlder