- Introdução
- O que é Docker ?
- O que diferencia um container de uma máquina virtual ?
- O que são Namespaces ?
- Para que serve o Cgroups ?
- O que é Union file systems ?
- Explorando o Docker
- Instalação
- Hello, Docker!
| export function postData (url, params, fileURL) { | |
| let data = new FormData() | |
| if (fileURL) { | |
| data.append('image', {uri: fileURL, name: 'image.jpg', type: 'image/jpg'}) | |
| } | |
| _.each(params, (value, key) => { | |
| if (value instanceof Date) { | |
| data.append(key, value.toISOString()) | |
| } else { | |
| data.append(key, String(value)) |
| Backup: | |
| docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql | |
| Restore: | |
| cat your_dump.sql | docker exec -i your-db-container psql -Upostgres |
| # The initial version | |
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi | |
| # My favorite from the comments. Thanks @richarddewit & others! | |
| set -a && source .env && set +a |