emqxarchive / emqx-docker

This repository is no longer maintained, please go to https://github.com/emqx/emqx-rel/tree/master/deploy/docker
Apache License 2.0
235 stars 162 forks source link

Emqtt Version 3 Dockerfile #85

Closed Tabrizian closed 5 years ago

Tabrizian commented 5 years ago

FEATURE REQUEST

Missing feature

emqtt version 3 Dockerfile

Justification

Tell us why you would like to see this feature added. Because it is the latest version of emqtt available.

Workarounds

Are there any workarounds you currently have in place because the feature is missing?

I have created a Dockerfile by myself, I want to see is there any chance of this getting merge or the fixes I have to apply in order to get it merged.

FROM erlang:21.1.1-alpine

RUN apk add build-base git wget

COPY . /emqttd
RUN cd /emqttd \
    && make \
    && mkdir -p /opt && mv /emqttd/_rel/emqttd /opt/emqttd \
    && cd / && rm -rf /emqttd \
    && mv /start.sh /opt/emqttd/start.sh \
    && chmod +x /opt/emqttd/start.sh \
    && ln -s /opt/emqttd/bin/* /usr/local/bin/ \
    # removing fetch deps and build deps
    && apk --purge del .build-deps .fetch-deps \
    && rm -rf /var/cache/apk/*

WORKDIR /opt/emqttd

# start emqttd and initial environments
CMD ["/opt/emqttd/start.sh"]

RUN adduser -D -u 1000 emqtt

RUN chgrp -Rf root /opt/emqttd && chmod -Rf g+w /opt/emqttd \
      && chown -Rf emqtt /opt/emqttd

USER emqtt

VOLUME ["/opt/emqttd/log", "/opt/emqttd/data", "/opt/emqttd/lib", "/opt/emqttd/etc"]

# emqttd will occupy these port:
# - 1883 port for MQTT
# - 8883 port for MQTT(SSL)
# - 8083 for WebSocket/HTTP
# - 8084 for WSS/HTTPS
# - 8080 for mgmt API
# - 18083 for dashboard
# - 4369 for port mapping
# - 6000-6999 for distributed node
EXPOSE 1883 8883 8083 8084 8080 18083 4369 6000-6999
cocowalla commented 5 years ago

Looks like there is already a 3.x dockerfile here, just that's it's not in master yet: emqx30

Rory-Z commented 5 years ago

Thank you for the code you contributed. As you can see, we already have a branch of emqx30. You can also get the latest image on the docker hub.