Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
kb:docker [2018/04/17 15:57] – created yehuda | kb:docker [2022/01/03 16:03] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
Good tool for management : https:// | Good tool for management : https:// | ||
+ | |||
+ | Start | ||
+ | <code bash> | ||
+ | docker container start portainer | ||
+ | </ | ||
+ | local url : [[http:// | ||
+ | |||
+ | <code bash> | ||
+ | docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=`docker-machine ip \`docker-machine active\`` --env ADVERTISED_PORT=9092 spotify/ | ||
+ | |||
+ | export KAFKA=`docker-machine ip \`docker-machine active\``: | ||
+ | export ZOOKEEPER=`docker-machine ip \`docker-machine active\``: | ||
+ | |||
+ | ./ | ||
+ | ./ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | yehuda@yehudakoLapHz ~/ | ||
+ | % cat docker-compose.yml | ||
+ | version: " | ||
+ | |||
+ | services: | ||
+ | webserver: | ||
+ | build: | ||
+ | context: ./ | ||
+ | container_name: | ||
+ | restart: ' | ||
+ | ports: | ||
+ | - " | ||
+ | - " | ||
+ | links: | ||
+ | - mysql | ||
+ | volumes: | ||
+ | - ${DOCUMENT_ROOT-./ | ||
+ | - ${PHP_INI-./ | ||
+ | - ${VHOSTS_DIR-./ | ||
+ | - ${LOG_DIR-./ | ||
+ | mysql: | ||
+ | build: ./bin/mysql | ||
+ | container_name: | ||
+ | restart: ' | ||
+ | ports: | ||
+ | - " | ||
+ | volumes: | ||
+ | - ${MYSQL_DATA_DIR-./ | ||
+ | - ${MYSQL_LOG_DIR-./ | ||
+ | environment: | ||
+ | MYSQL_ROOT_PASSWORD: | ||
+ | MYSQL_DATABASE: | ||
+ | MYSQL_USER: ${MYSQL_USER} | ||
+ | MYSQL_PASSWORD: | ||
+ | phpmyadmin: | ||
+ | image: phpmyadmin/ | ||
+ | container_name: | ||
+ | links: | ||
+ | - mysql | ||
+ | environment: | ||
+ | PMA_HOST: mysql | ||
+ | PMA_PORT: 3306 | ||
+ | PMA_USER: ${MYSQL_USER} | ||
+ | PMA_PASSWORD: | ||
+ | MYSQL_ROOT_PASSWORD: | ||
+ | MYSQL_USER: ${MYSQL_USER} | ||
+ | MYSQL_PASSWORD: | ||
+ | ports: | ||
+ | - ' | ||
+ | volumes: | ||
+ | - /sessions | ||
+ | redis: | ||
+ | container_name: | ||
+ | image: redis: | ||
+ | ports: | ||
+ | - " | ||
+ | yehuda@yehudakoLapHz ~/ | ||
+ | % ls .env | ||
+ | .env | ||
+ | yehuda@yehudakoLapHz ~/ | ||
+ | % cat .env | ||
+ | DOCUMENT_ROOT=./ | ||
+ | VHOSTS_DIR=./ | ||
+ | APACHE_LOG_DIR=./ | ||
+ | PHP_INI=./ | ||
+ | MYSQL_DATA_DIR=./ | ||
+ | MYSQL_LOG_DIR=./ | ||
+ | |||
+ | # If you already has the port 80 in use, you can change it (for example if you have Apache) | ||
+ | HOST_MACHINE_UNSECURE_HOST_PORT=80 | ||
+ | HOST_MACHINE_SECURE_HOST_PORT=443 | ||
+ | |||
+ | # If you already has the port 3306 in use, you can change it (for example if you have MySQL) | ||
+ | HOST_MACHINE_MYSQL_PORT=3306 | ||
+ | |||
+ | # If you already has the port 6379 in use, you can change it (for example if you have Redis) | ||
+ | HOST_MACHINE_REDIS_PORT=6379 | ||
+ | |||
+ | |||
+ | # MySQL root user password | ||
+ | MYSQL_ROOT_PASSWORD=tiger | ||
+ | |||
+ | # Database settings: Username, password and database name | ||
+ | MYSQL_USER=docker | ||
+ | MYSQL_PASSWORD=docker | ||
+ | MYSQL_DATABASE=docker | ||
+ | |||
+ | </ |