Used to build java docker image
Add bash, vim, unzip, curl, in order to do some operation easily in container.
Suggest you deploy your code in "/deployments" dir.
Change 1.0.1 tag to 8-alpine tag.
FROM dbhys/milas-java
VOLUME /tmp
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} /deployments/app.jar
EXPOSE 8080
CMD ["java","-jar","app.jar"]
Note: The default WORKDIR is /deployments, and you must run "java -jar" at WORKDIR, other wise the external config application property files won't be loaded.
springboot-external-config-application-property-files
SpringApplication will load properties from application.properties files in the following locations and add them to the Spring Environment:
1. A /config subdir of the current directory.
2. The current directory
3. A classpath /config package
4. The classpath root
build -t my-app:1.0.0 .
Content type
Image
Digest
Size
191.4 MB
Last updated
almost 5 years ago
docker pull dbhys/milas-java