This file contains hidden or 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 | |
| # Delete all containers | |
| docker rm -f $(docker ps -a -q) | |
| # Delete all images | |
| docker rmi -f $(docker images -q) | |
| remove one image: | |
| docker rmi dina/media:v0.4 | |
| check |
This file contains hidden or 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
| ex. | |
| docker pull dina/media:v0.4 | |
| docker run --rm -it dina/media:v0.4 bash | |
| docker run -it -p 9990:9990 dina/media:v0.4 | |
| remove one image: | |
| docker rmi dina/media:v0.4 | |
| remove a single container ( whith id = beec50b40e9cf67cddd7cf38557f60510d22d2d90182932dfd56974da5075b27 ) |
This file contains hidden or 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
| driver=com.mysql.jdbc.Driver | |
| url=jdbc:mysql://localhost:3306/liquibase_demo | |
| username=demo | |
| password=demo | |
| verbose=true | |
| dropFirst=false |
This file contains hidden or 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
| backup-db: | |
| docker exec -it db \ | |
| bash -c "pg_dump -U $(POSTGRES_USER) -d $(POSTGRES_DB) > /tmp/clb.sql" | |
| restore-dyntaxa-dump: | |
| test -f clb.sql || curl -L --progress -o clb.sql \ | |
| "https://nrmowncloud.nrm.se/owncloud/index.php/s/0tiY0uLW4wqQ9p7/download?path=%2F&files=clb_structure_and_data.dump" | |
| docker cp clb.sql db:/tmp/clb.sql |
This file contains hidden or 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
| If you have set up your system, so that you can run dns-docker and run into trouble. | |
| Trouble: | |
| $ sudo service docker restart | |
| Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. | |
| Files you should look into: | |
| (1) /etc/default/docker | |
| The 2 lines starting with 'DOCKER_OPTS' should be commented-out | |
| # Use DOCKER_OPTS to modify the daemon startup options. |
This file contains hidden or 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
| example from redmine: | |
| crontab -l | { cat; echo "*/5 * * * * /usr/src/redmine/receive_imap.sh"; } | crontab - |
This file contains hidden or 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
| CREATE USER 'ink'@'localhost' IDENTIFIED BY 'ink'; | |
| GRANT ALL PRIVILEGES ON inksdb.* To 'ink'@'localhost' IDENTIFIED BY 'ink'; |
This file contains hidden or 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
| 2017-06-29 | |
| mysql> select version(); | |
| +-------------------------+ | |
| | version() | | |
| +-------------------------+ | |
| | 5.7.18-0ubuntu0.16.04.1 | | |
| +-------------------------+ | |
| 1 row in set (0,00 sec) | |
This file contains hidden or 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
| push a branch: | |
| git push -u origin <branch> , i.e git push -u origin issue8 | |
| fetch only a branch: | |
| git clone -b <branch> <repo>.git |
This file contains hidden or 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
| Q1: use gpg in the script, fetch psw from file does not work ... | |
| Q2: use scp to cp the file to a remote location | |
| info: mysqldump + tarring all the redmine_files ... becomes an tar. | |
| #!/bin/bash | |
| source .env/.env.db | |
| TARGET=tst | |
| NOW=`date +"%Y-%m-%d"` | |
| TARGET_DIR=$TARGET/$NOW |