Skip to content

Instantly share code, notes, and snippets.

@mustardandrew
Last active November 21, 2017 09:30
Show Gist options
  • Save mustardandrew/b33f45b01acb9c60e0f3b70345151875 to your computer and use it in GitHub Desktop.
Save mustardandrew/b33f45b01acb9c60e0f3b70345151875 to your computer and use it in GitHub Desktop.
Install and config docker
#!/bin/bash
# for install docker and docker-compose
sudo apt-get update
sudo apt-get -y install docker.io docker-compose
# open file and write DOCKER_OPTS="--bip 172.17.42.1/16"
sudo nano /etc/default/docker
# then restart docker service
service docker restart
mysql:
image: mysql:5.7
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: database
MYSQL_USER: user
MYSQL_PASSWORD: password
TZ: Europe/Kiev
volumes:
- ../storage/mysql:/var/lib/mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment