https://github.com/osiegmar/spring-boot-docker-readonly
Example project for Spring Boot application running inside a read-only docker container
https://github.com/osiegmar/spring-boot-docker-readonly
docker spring-boot
Last synced: 3 months ago
JSON representation
Example project for Spring Boot application running inside a read-only docker container
- Host: GitHub
- URL: https://github.com/osiegmar/spring-boot-docker-readonly
- Owner: osiegmar
- License: apache-2.0
- Created: 2017-03-12T14:44:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-12T14:54:00.000Z (about 9 years ago)
- Last Synced: 2025-11-12T04:05:04.998Z (7 months ago)
- Topics: docker, spring-boot
- Language: Java
- Homepage:
- Size: 55.7 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Spring Boot application in read-only docker container
Example project for Spring Boot application running inside a read-only docker container.
Basically these steps are currently required:
* Add `server.tomcat.basedir=/tmp/tomcat` to `application.properties`
* Create `/tmp/tomcat` and `static` within `Dockerfile`
See https://github.com/spring-projects/spring-boot/issues/8578 for background information.
## Steps to build and run this application
```sh
./gradlew build
docker build -t spring-boot-docker-readonly .
docker run -ti --rm --read-only spring-boot-docker-readonly
```
# Warning
Don't consider this as a recommended solution! It's a **ugly hack** - for demonstration purposes only!