Created
February 15, 2017 12:38
-
-
Save mihanvr/0cc9ff25d8df4d7b6bcf302071d70466 to your computer and use it in GitHub Desktop.
Run jar in docker-compose without create Dockerfile
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: '2' | |
| services: | |
| java-server: | |
| image: java:8-jre-alpine | |
| restart: always | |
| environment: | |
| spring.profiles.active: docker | |
| jargs: -Djava.security.egd=file:/dev/./urandom | |
| volumes: | |
| - ./:/app | |
| # magic for jargs | |
| entrypoint: sh -c 'java $$jargs -jar /app/*.jar' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment