Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mov volume before build

#docker-compose.yml
version: '3'
services:
    db:
        volumes:
          - ./configs/mysql/data:/docker-entrypoint-initdb.d
       build: ./build/mysql/ #this is pointing to my Dockerfile
         container_name: MYSQL_Database
         restart: always
     environment:
         MYSQL_PORT: 3306
         MYSQL_ROOT_PASSWORD: admin
         MYSQL_DATABASE: my_app_database
         MYSQL_USER: admin
         MYSQL_PASSWORD: admin
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mov #volume #build
ADD COMMENT
Topic
Name
6+7 =