From 551e9801b2a1296062d6bb347ed1a1c2aec6a646 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Mon, 30 Apr 2018 23:18:04 +0200 Subject: [PATCH] Migrate ActiveMQ to S6 supervisor --- activemq/Dockerfile | 7 ++----- activemq/docker/etc/services.d/.s6-svscan/finish | 3 +++ activemq/docker/etc/services.d/activemq/run | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) create mode 100755 activemq/docker/etc/services.d/.s6-svscan/finish create mode 100755 activemq/docker/etc/services.d/activemq/run 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