-
-
Save Letsfindme/84c3c67cee1212f1008856a74c7c49ea to your computer and use it in GitHub Desktop.
Simple openjdk and mysql docker set-up
This file contains hidden or 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: | |
| app: | |
| build: | |
| dockerfile: Dockerfile | |
| context: . | |
| database: | |
| image: mysql:5.7 | |
| volumes: | |
| - mysql:/var/lib/mysql | |
| - ./dump.sql:/docker-entrypoint-initdb.d/1-dump.sql | |
| environment: | |
| MYSQL_RANDOM_ROOT_PASSWORD: 1 | |
| MYSQL_DATABASE: qwerty | |
| MYSQL_USER: qwerty | |
| MYSQL_PASSWORD: qwerty | |
| volumes: | |
| mysql: |
This file contains hidden or 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
| FROM openjdk:8u201-jdk-alpine3.9 | |
| RUN apk update && apk add mysql-client && rm -f /var/cache/apk/* | |
| ENTRYPOINT ["sh"] | |
| CMD ["-c" , "tail -f /dev/null"] |
This file contains hidden or 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
| SELECT 1 + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment