forked from vshn/openshift-rabbitmq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (39 loc) · 1.74 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM openshift/base-centos7
MAINTAINER Luis Fernando Gomes <your@luiscoms.com.br>
ENV ERLANG_SOLUTIONS_VERSION 1.0-1
RUN yum -y install epel-release && \
yum update -y && \
yum install -y wget && \
yum install -y http://packages.erlang-solutions.com/erlang-solutions-${ERLANG_SOLUTIONS_VERSION}.noarch.rpm && \
yum install -y erlang && \
yum clean all
ENV RABBITMQ_VERSION 3.6.5
RUN yum install -y http://www.rabbitmq.com/releases/rabbitmq-server/v${RABBITMQ_VERSION}/rabbitmq-server-${RABBITMQ_VERSION}-1.noarch.rpm && yum clean all
RUN echo "[{rabbit,[{loopback_users,[]}]}]." > /etc/rabbitmq/rabbitmq.config
RUN rm -rf /var/lib/rabbitmq/mnesia
EXPOSE 4369 5671 5672 25672
# get logs to stdout (thanks @dumbbell for pushing this upstream! :D)
ENV RABBITMQ_LOGS=- RABBITMQ_SASL_LOGS=-
# LABEL io.k8s.description="RabbitMQ application" \
# io.k8s.display-name="builder x.y.z" \
# io.openshift.expose-services="8080:http" \
# io.openshift.tags="builder,x.y.z,etc."
# set home so that any `--user` knows where to put the erlang cookie
ENV HOME /var/lib/rabbitmq
RUN mkdir -p /var/lib/rabbitmq /etc/rabbitmq \
&& chown -R rabbitmq:root /var/lib/rabbitmq /etc/rabbitmq \
&& chmod -R g=rwX /var/lib/rabbitmq /etc/rabbitmq
RUN chown -R rabbitmq:root /opt/app-root
# && \
# chown -R rabbitmq:rabbitmq /var/log/rabbitmq/ && \
# chown -R rabbitmq:rabbitmq /var/lib/rabbitmq && \
# chown -R rabbitmq:rabbitmq /etc/rabbitmq/ && \
# chown -R rabbitmq:rabbitmq /usr/sbin/rabbitmq*
VOLUME /var/lib/rabbitmq/
RUN ls -la /var/lib/rabbitmq/
COPY ./docker-entrypoint.sh /usr/local/bin/
USER "rabbitmq"
# CMD "$STI_SCRIPTS_PATH/run"
# CMD "/docker-entrypoint.sh"
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["/usr/lib/rabbitmq/bin/rabbitmq-server"]