## This is a fast-build Dockerfile only for testing
FROM ubuntu:20.04@sha256:f2034e7195f61334e6caff6ecf2e965f92d11e888309065da85ff50c617732b8
ARG PROFILE=emqx
RUN apt-get update; \
apt-get install -y --no-install-recommends ca-certificates procps; \
rm -rf /var/lib/apt/lists/*
RUN mkdir /opt/emqx
RUN date > /opt/emqx/BUILD_TIME
COPY _build/${PROFILE}/rel/emqx /opt/emqx
RUN ln -s /opt/emqx/bin/* /usr/local/bin/
COPY deploy/docker/docker-entrypoint.sh /usr/bin/
WORKDIR /opt/emqx
RUN groupadd -r -g 1000 emqx; \
useradd -r -m -u 1000 -g emqx emqx; \
chgrp -Rf emqx /opt/emqx; \
chmod -Rf g+w /opt/emqx; \
chown -Rf emqx /opt/emqx
USER emqx
VOLUME ["/opt/emqx/log", "/opt/emqx/data"]
# emqx will occupy these port:
# - 1883 port for MQTT
# - 8083 for WebSocket/HTTP
# - 8084 for WSS/HTTPS
# - 8883 port for MQTT(SSL)
# - 18083 for dashboard and API
# - 4370 default Erlang distrbution port
# - 5369 for backplain gen_rpc
EXPOSE 1883 8083 8084 8883 18083 4370 5369
ENTRYPOINT ["/usr/bin/docker-entrypoint.sh"]
CMD ["/opt/emqx/bin/emqx", "foreground"]
emqx-Dockerfile.ubuntu20.04.runner
未经允许不得转载:工具盒子 » emqx-Dockerfile.ubuntu20.04.runner