diff --git a/Dockerfile b/Dockerfile index 6374ed7..1e95388 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,8 @@ FROM anapsix/alpine-java:jre7 MAINTAINER Andrew Gaul 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"] diff --git a/src/main/resources/run-docker-container.sh b/src/main/resources/run-docker-container.sh new file mode 100755 index 0000000..1a964cb --- /dev/null +++ b/src/main/resources/run-docker-container.sh @@ -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