-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
40 lines (34 loc) · 1.12 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
ARG CODENAME
FROM registry.drycc.cc/drycc/base:${CODENAME}
ENV DRYCC_UID=1001 \
DRYCC_GID=1001 \
DRYCC_HOME_DIR=/data \
JQ_VERSION="1.7.1" \
ERLANG_VERSION="27.1.2" \
RABBITMQ_LOGS=- \
RABBITMQ_VERSION="4.0.3"
COPY rootfs/usr/local/bin/start-rabbitmq /usr/local/bin/start-rabbitmq
RUN groupadd drycc --gid ${DRYCC_GID} \
&& useradd drycc -u ${DRYCC_UID} -g ${DRYCC_GID} -s /bin/bash -m -d ${DRYCC_HOME_DIR}
RUN install-stack jq ${JQ_VERSION} \
&& install-stack erlang ${ERLANG_VERSION} \
&& install-stack rabbitmq ${RABBITMQ_VERSION} \
&& rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/IBM* \
/usr/lib/`echo $(uname -m)`-linux-gnu/gconv/EBC* \
&& mkdir -p /usr/share/man/man{1..8} \
&& chown -R ${DRYCC_UID}:${DRYCC_GID} /opt/drycc/rabbitmq ${DRYCC_HOME_DIR}
WORKDIR ${DRYCC_HOME_DIR}
USER ${DRYCC_UID}
CMD ["rabbitmq-server"]
EXPOSE 4369 5671 5672 15691 15692 25672