content: # docker run --rm -it -p 127.0.0.1:61616:61616 -p 127.0.0.1:5672:5672 -p 127.0.0.1:61613:61613 -p 127.0.0.1:1883:1883 -p 127.0.0.1:61614:61614 -p 127.0.0.1:8161:8161 -v /tmp:/tmp -d b75e8ac9ec6b13a08a5f9acb9bd982453ab27b7c214a43bdf049dd72d8da34dc
  ARG JAVA_VERSION=11
  FROM amazoncorretto:$JAVA_VERSION
  ARG ACTIVEMQ_VERSION
  
  ENV ACTIVEMQ_VERSION=2.27.1
  ENV ACTIVEMQ=apache-artemis-$ACTIVEMQ_VERSION
  ENV ACTIVEMQ_HOME=/opt/$ACTIVEMQ
  ENV ACTIVEMQ_TCP=61616
  ENV ACTIVEMQ_AMQP=5672
  ENV ACTIVEMQ_STOMP=61613
  ENV ACTIVEMQ_MQTT=1883
  ENV ACTIVEMQ_WS=61614
  ENV ACTIVEMQ_UI=8161
  
  RUN yum -y install tar gzip shadow-utils && yum -y clean all  && rm -rf /var/cache
  
  RUN curl "https://www.apache.org/dyn/closer.cgi?filename=activemq/activemq-artemis/$ACTIVEMQ_VERSION/$ACTIVEMQ-bin.tar.gz&action=download" -o $ACTIVEMQ-bin.tar.gz -L
  
  RUN tar -xzf $ACTIVEMQ-bin.tar.gz -C /opt && \
      ln -s /opt/$ACTIVEMQ $ACTIVEMQ_HOME && \
      useradd -r -M -d $ACTIVEMQ_HOME activemq
  
  RUN rm -rf $ACTIVEMQ-bin.tar.gz
  
  RUN cd $ACTIVEMQ_HOME/bin && ./artemis create test --user admin --password admin --require-login
  
  RUN chown -R activemq:activemq /opt/$ACTIVEMQ && \
      chown -h activemq:activemq $ACTIVEMQ_HOME
  
  RUN sed -i 's/localhost/0.0.0.0/' $ACTIVEMQ_HOME/bin/test/etc/bootstrap.xml
  
  USER activemq
  
  WORKDIR $ACTIVEMQ_HOME
  
  EXPOSE $ACTIVEMQ_TCP $ACTIVEMQ_AMQP $ACTIVEMQ_STOMP $ACTIVEMQ_MQTT $ACTIVEMQ_WS $ACTIVEMQ_UI
  
  CMD ["/bin/sh", "-c", "bin/test/bin/artemis run"]