Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tloriato/9e004ebdccd40b03e3d322909d5cd97d to your computer and use it in GitHub Desktop.
Save tloriato/9e004ebdccd40b03e3d322909d5cd97d to your computer and use it in GitHub Desktop.
version: '2'
services:
# basenode:
# build: ./base
# stdin_open: true
# tty: true
mysqldb:
image: mysql:5.7
restart: always
ports:
# <Port exposed> : < MySQL Port running inside container>
- '5306:3306'
expose:
# Opens port 3306 on the container
- '3306'
environment:
MYSQL_DATABASE: 'abe'
# So you don't have to use root, but you can if you like
MYSQL_USER: 'abe'
# You can use whatever password you like
MYSQL_PASSWORD: 'PASSWORD'
# Password for root access
MYSQL_ROOT_PASSWORD: 'PASSWORD'
# Where our data will be persisted
# volumes:
#- my-db:/var/lib/mysql
# volumes:
# my-db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment