├── service1
│ └── Dockerfile
├── service2
│ └── Dockerfile
├── service3
│ └── Dockerfile
├── docker-compose.yml
└── docker-compose-dev.yml
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
image: docker:latest | |
services: | |
- docker:dind | |
stages: | |
- build | |
- test | |
- release | |
variables: | |
CONTAINER_IMAGE: registry.anuary.com/$CI_PROJECT_PATH | |
DOCKER_DRIVER: overlay2 |
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
docker exec -i mysql_container mysql -uexampleName -ppassword database_name < filename.sql | |
docker cp filename.sql conatianer_ID:/filename.sql | |
docker exec -it container_ID bin/bash | |
mysql -u<username> -p | |
mysql> use <DB_NAME>; | |
mysql> source ./<FILE_NAME>.sql | |
docker exec $db_id mysql -hdb -uopencart -ppassword opencart -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" |
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
sudo mkdir -p /opt/clickhouse/{data,etc,log} | |
sudo chmod 777 /opt/clickhouse/{data,etc,log} | |
sudo docker run -d --name clickhouse \ | |
--ulimit nofile=262144:262144 \ | |
-p 127.0.0.1:8123:8123 -p 127.0.0.1:9000:9000 \ | |
-v /opt/clickhouse/log:/var/log/clickhouse-server \ | |
-v /opt/clickhouse/data:/var/lib/clickhouse \ | |
yandex/clickhouse-server |
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
docker-machine create \ | |
--driver virtualbox \ | |
--virtualbox-cpu-count "4" \ | |
--virtualbox-memory "4000" \ | |
--virtualbox-no-vtx-check \ | |
default |
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' | |
services: | |
rabbitmq: | |
image: rabbitmq:3.7.14-management-alpine | |
hostname: "rabbit" | |
environment: | |
RABBITMQ_DEFAULT_VHOST: "/" | |
ports: | |
- "15672:15672" | |
- "5672:5672" |
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
# This can be in .zshrc or .bash_profile | |
export FORMAT="\nID\t{{.ID}}\nIMAGE\t{{.Image}}\nCOMMAND\t{{.Command}}\nCREATED\t{{.RunningFor}}\nSTATUS\t{{.Status}}\nPORTS\t{{.Ports}}\nNAMES\t{{.Names}}\n" | |
docker ps --format $FORMAT |
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
docker system df --verbose |
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
# Show running containers | |
docker container ls | |
# Show all containers | |
docker container ls -a | |
# Create container from image | |
# -d run as daemon in background | |
# -p say what port to map in container | |
# --name give container a name |