diff --git a/activemq/Dockerfile b/activemq/Dockerfile index 38ed240..8303ed3 100644 --- a/activemq/Dockerfile +++ b/activemq/Dockerfile @@ -13,14 +13,11 @@ RUN \ && mkdir /srv/activemq/tmp \ && chown activemq:activemq /srv/activemq/tmp \ # Configure Java heap size - && sed -i "s/-Xms64M -Xmx1G/-Xms32M -Xmx256M/" /srv/activemq/bin/env \ - # Make start/stop script visible globally - && ln -s /srv/activemq/bin/activemq /usr/local/bin/activemq + && sed -i "s/-Xms64M -Xmx1G/-Xms32M -Xmx256M/" /srv/activemq/bin/env COPY docker/ / VOLUME ["/srv/activemq/data"] EXPOSE 61616 -USER activemq -CMD ["activemq", "console"] +CMD ["s6-svscan", "/etc/services.d"] diff --git a/activemq/docker/etc/services.d/.s6-svscan/finish b/activemq/docker/etc/services.d/.s6-svscan/finish new file mode 100755 index 0000000..78d5fdc --- /dev/null +++ b/activemq/docker/etc/services.d/.s6-svscan/finish @@ -0,0 +1,3 @@ +#!/bin/sh + +/bin/true diff --git a/activemq/docker/etc/services.d/activemq/run b/activemq/docker/etc/services.d/activemq/run new file mode 100755 index 0000000..3c99a93 --- /dev/null +++ b/activemq/docker/etc/services.d/activemq/run @@ -0,0 +1,5 @@ +#!/bin/execlineb -P + +fdmove -c 2 1 +s6-setuidgid 61616:61616 +/srv/activemq/bin/activemq console