Add Docker support

This commit is contained in:
Maxime Dor
2017-09-02 17:45:53 +02:00
parent d5d58e8b11
commit 2244c698b4
3 changed files with 18 additions and 1 deletions

11
Dockerfile Normal file
View File

@@ -0,0 +1,11 @@
FROM openjdk:8-jdk-alpine
VOLUME /etc/mxisd
VOLUME /var/mxisd
EXPOSE 8090
ADD build/libs/mxisd.jar /mxisd.jar
ADD src/docker/start.sh /start.sh
ENV JAVA_OPTS=""
CMD [ "/start.sh" ]

View File

@@ -41,7 +41,11 @@ See releases for native installers of supported systems.
If none is available, please use other packages or build from source. If none is available, please use other packages or build from source.
## Docker ## Docker
- https://github.com/doofy/mxisd-docker ### From source
```
docker build -t your-org/mxisd:$(git describe --tags --always --dirty) .
docker run -v /data/mxisd/etc:/etc/mxisd -v /data/mxisd/var:/var/mxisd -t your-org/mxisd:$(git describe --tags --always --dirty)
```
## Debian ## Debian
TODO TODO

2
src/docker/start.sh Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/sh
exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Dspring.config.location=/etc/mxisd/ -Dspring.config.name=mxisd -jar /mxisd.jar