Docker base image for Spring Boot applications.
10K+
A Docker base image, following Docker image best-practices, for Spring Boot applications.
Some features:
SIGINT) to the Spring Boot applicationUsing this base image to create an image for your Spring Boot application is easy:
FROM imageapp.jar)
file is in the same directory as the Dockerfile you've created aboveHere's an example on how you would use it
(Replace /path/to/spring/boot/application.jar
to the actual path of your Spring Boot application jar file):
mkdir bootapp-docker && cd bootapp-docker
echo "FROM etiennek/spring-boot" > Dockerfile
cp /path/to/spring/boot/application.jar ./app.jar
docker build -t bootapp-docker .
docker run -p 8007:8007 bootapp-docker
Then open up your browser to http://localhost:8007/ and you should see your Spring Boot application's index page.
To inject JVM- and application arguments during runtime,
simply override the BOOTAPP_JAVA_OPTS (for JVM) and
BOOTAPP_OPTS (for application) environment variables.
Example:
docker run -p 8007:8007 \
-e BOOTAPP_JAVA_OPTS="-Xms512m -Xmx1024m" \
-e BOOTAPP_OPTS="--spring.profiles.active=test --spring.main.banner-mode=off" \
bootapp-docker
Content type
Image
Digest
Size
68.9 MB
Last updated
over 8 years ago
docker pull etiennek/spring-boot