LXCize RabbitMQ build

This commit is contained in:
Disassembler 2018-09-13 14:20:37 +02:00
parent 384f43748b
commit 523765188a
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
4 changed files with 20 additions and 17 deletions

View File

@ -1,17 +0,0 @@
FROM alpine:3.8
LABEL maintainer="Disassembler <disassembler@dasm.cz>"
RUN \
# Create OS user (which will be picked up later by apk add)
addgroup -S -g 5672 rabbitmq \
&& adduser -S -u 5672 -h /usr/lib/rabbitmq -s /bin/false -g rabbitmq -G rabbitmq rabbitmq \
# Add edge/testing repository
&& echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \
# Install RabbitMQ
&& apk --no-cache add rabbitmq-server@edge
VOLUME ["/var/lib/rabbitmq/mnesia"]
EXPOSE 5672
USER rabbitmq
CMD ["rabbitmq-server"]

20
rabbitmq/lxcfile Normal file
View File

@ -0,0 +1,20 @@
IMAGE rabbitmq
LAYER shared/alpine
LAYER rabbitmq/rabbitmq
RUN EOF
# Create OS user (which will be picked up later by apk add)
addgroup -S -g 5672 rabbitmq
adduser -S -u 5672 -h /usr/lib/rabbitmq -s /bin/false -g rabbitmq -G rabbitmq rabbitmq
# Add edge/testing repository
echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories
# Install RabbitMQ
apk --no-cache add rabbitmq-server@edge
EOF
MOUNT /srv/rabbitmq/data var/lib/rabbitmq/mnesia
USER 5672 5672
CMD /usr/sbin/rabbitmq-server