Honor SIGINT in Docker container

Use intermediate shell script to forward environment variables then
exec java.
pull/154/head
Andrew Gaul 2016-09-04 22:14:59 -07:00
rodzic 224bb8b2f6
commit 9f0bc8a17b
2 zmienionych plików z 17 dodań i 13 usunięć

Wyświetl plik

@ -2,7 +2,8 @@ FROM anapsix/alpine-java:jre7
MAINTAINER Andrew Gaul <andrew@gaul.org>
WORKDIR /opt/s3proxy
COPY target/s3proxy /opt/s3proxy/s3proxy
COPY target/s3proxy /opt/s3proxy/
COPY src/main/resources/run-docker-container.sh /opt/s3proxy/
ENV \
LOG_LEVEL="info" \
@ -17,15 +18,4 @@ ENV \
EXPOSE 80
VOLUME /data
ENTRYPOINT java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null
ENTRYPOINT ["/opt/s3proxy/run-docker-container.sh"]

Wyświetl plik

@ -0,0 +1,14 @@
#!/bin/sh
exec java \
-DLOG_LEVEL=${LOG_LEVEL} \
-Ds3proxy.endpoint=http://0.0.0.0:80 \
-Ds3proxy.authorization=${S3PROXY_AUTHORIZATION} \
-Ds3proxy.identity=${S3PROXY_IDENTITY} \
-Ds3proxy.credential=${S3PROXY_CREDENTIAL} \
-Djclouds.provider=${JCLOUDS_PROVIDER} \
-Djclouds.identity=${JCLOUDS_IDENTITY} \
-Djclouds.credential=${JCLOUDS_CREDENTIAL} \
-Djclouds.filesystem.basedir=/data \
-jar /opt/s3proxy/s3proxy \
--properties /dev/null