<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Docker and Mango v5.0.2]]></title><description><![CDATA[<p dir="auto">Hello, we are having issues with the installation of Mango 5 in a Docker container. When starting Mango, it doesn't proceed beyond the step "Loading Jetty web server SSL/TLS certificate from: /opt/mango/certificates/instance.p12." We are doing this using JDK-17.</p>
<p dir="auto">This is a Dockerfile:</p>
<p dir="auto">FROM openjdk:17-ea-17-jdk</p>
<p dir="auto">COPY free-m2m2-core-5.0.2.zip /tmp<br />
RUN mkdir -p /opt/mango <br />
&amp;&amp; microdnf install unzip openssl <br />
&amp;&amp; unzip /tmp/free-m2m2-core-5.0.2.zip -d /opt/mango <br />
&amp;&amp; cd /opt/mango</p>
<p dir="auto">ENV MA_HOME /opt/mango<br />
ENV MA_CP $MA_HOME/overrides/classes:$MA_HOME/classes:$MA_HOME/overrides/properties:$MA_HOME/overrides/lib/<em>:$MA_HOME/lib/</em></p>
<p dir="auto">EXPOSE 5000<br />
WORKDIR /opt/mango<br />
ENTRYPOINT exec java -server -cp $MA_CP -Dma.home=$MA_HOME -Djava.library.path=$MA_HOME/overrides/lib:$MA_HOME/lib:/usr/lib/jni/:$PATH com.serotonin.m2m2.Main</p>
]]></description><link>https://forum.mango-os.com/topic/5772/docker-and-mango-v5-0-2</link><generator>RSS for Node</generator><lastBuildDate>Sun, 17 May 2026 00:32:42 GMT</lastBuildDate><atom:link href="https://forum.mango-os.com/topic/5772.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Sep 2023 10:39:23 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Wed, 13 Dec 2023 16:20:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a></p>
<p dir="auto">When I execute your command, a container is created, but without Mango being installed.<br />
Since my knowledge is too limited, I'm going to install mango in a windows environment.<br />
Still, thank you for your efforts!</p>
]]></description><link>https://forum.mango-os.com/post/28084</link><guid isPermaLink="true">https://forum.mango-os.com/post/28084</guid><dc:creator><![CDATA[Mark]]></dc:creator><pubDate>Wed, 13 Dec 2023 16:20:01 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Wed, 13 Dec 2023 05:03:09 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mark" aria-label="Profile: Mark">@<bdi>Mark</bdi></a><br />
<code>ENTRYPOINT exec bin/start-mango.sh </code><br />
By itself, you shouldn't need those other parameters. Those environment variables are already set above.<br />
As for why it exited, you'd need to see the output from mango/logs/ma.log.<br />
Alternatively, if it's running then crashing you should be able to view the log in the console by issuing the command<br />
<code>docker run --rm -it --entrypoint /bin/bash &lt;image_name&gt;</code><br />
That will help you view any remaining output.</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28081</link><guid isPermaLink="true">https://forum.mango-os.com/post/28081</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Wed, 13 Dec 2023 05:03:09 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Tue, 12 Dec 2023 20:46:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a></p>
<p dir="auto">I have used the file below and now I get the following message:</p>
<p dir="auto">++ HOME environment variable is /opt/mango<br />
++ mango_paths_home is /opt/mango<br />
+++++ Mango configuration found on<br />
++ mango_script_dir is /opt/mango/bin<br />
++ mango_paths_data is /opt/mango<br />
Mango installation/home directory is /opt/mango<br />
Mango data path is /opt/mango<br />
Starting Mango<br />
Mango started (PID 16)</p>
<p dir="auto">The container returns status "exited"</p>
<p dir="auto">FROM openjdk:17-ea-17-jdk</p>
<p dir="auto">COPY free-m2m2-core-5.0.3.zip /tmp<br />
RUN mkdir -p /opt/mango <br />
&amp;&amp; microdnf install -y unzip openssl <br />
&amp;&amp; unzip /tmp/free-m2m2-core-5.0.3.zip -d /opt/mango <br />
&amp;&amp; cd /opt/mango</p>
<p dir="auto">ENV HOME /opt/mango<br />
ENV MA_HOME /opt/mango<br />
ENV MA_CP $MA_HOME/overrides/classes:$MA_HOME/classes:$MA_HOME/overrides/properties:$MA_HOME/overrides/lib/:$MA_HOME/lib/</p>
<p dir="auto">EXPOSE 8443<br />
WORKDIR /opt/mango<br />
ENTRYPOINT exec bin/start-mango.sh $MA_CP -Dma.home=$MA_HOME -Djava.library.path=$MA_HOME/overrides/lib:$MA_HOME/lib:/usr/lib/jni/:$PATH com.serotonin.m2m2.Main</p>
]]></description><link>https://forum.mango-os.com/post/28080</link><guid isPermaLink="true">https://forum.mango-os.com/post/28080</guid><dc:creator><![CDATA[Mark]]></dc:creator><pubDate>Tue, 12 Dec 2023 20:46:07 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Tue, 12 Dec 2023 15:49:42 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tungthanh500" aria-label="Profile: tungthanh500">@<bdi>tungthanh500</bdi></a> there are ways around this.  In Mango 5 the default is to have HTTPS enabled on first start.  This also enables HSTS which redirects from the HTTP port to HTTPS.  You can change these settings by injecting mango properties into the container or modifying the mango.properties file you are loading.</p>
<p dir="auto">Take a look at these properties:</p>
<pre><code># Note: Enabling SSL/TLS also turns on HSTS by default, see the ssl.hsts.enabled setting below
ssl.on=true
ssl.port=8443

...

# Configure HSTS (HTTP Strict Transport Security)
# Enabled by default when ssl.on=true
# Sets the Strict-Transport-Security header, web browsers will always connect using HTTPS when they
# see this header and they will cache the result for max-age seconds
ssl.hsts.enabled=true
ssl.hsts.maxAge=31536000
ssl.hsts.includeSubDomains=false
</code></pre>
<p dir="auto">And how to inject them into the container as env variables:  <a href="https://docs-v5.radixiot.com/configure-mango-properties" rel="nofollow ugc">https://docs-v5.radixiot.com/configure-mango-properties</a></p>
<p dir="auto">Just note that if you change the HSTS settings you will need to clear your browser cache since it will have cached the entry to always use HTTPS already.</p>
]]></description><link>https://forum.mango-os.com/post/28079</link><guid isPermaLink="true">https://forum.mango-os.com/post/28079</guid><dc:creator><![CDATA[terrypacker]]></dc:creator><pubDate>Tue, 12 Dec 2023 15:49:42 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Tue, 12 Dec 2023 15:35:19 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a> If I am not wrong, in Mango 5, you must access the web with 8443 (or SSL route) and there is no workaround. I'm using an Mango instance on Windows to try stuff and no way out :"&lt;</p>
]]></description><link>https://forum.mango-os.com/post/28078</link><guid isPermaLink="true">https://forum.mango-os.com/post/28078</guid><dc:creator><![CDATA[tungthanh500]]></dc:creator><pubDate>Tue, 12 Dec 2023 15:35:19 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Tue, 12 Dec 2023 09:29:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mark" aria-label="Profile: Mark">@<bdi>Mark</bdi></a><br />
If my docker knowledge is correct, I'd replace<br />
<code>ENTRYPOINT exec java -server -cp $MA_CP -Dma.home=$MA_HOME -Djava.library.path=$MA_HOME/overrides/lib:$MA_HOME/lib:/usr/lib/jni/:$PATH com.serotonin.m2m2.Main</code></p>
<p dir="auto">with <code>ENTRYPOINT exec bin/start-mango.sh</code></p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28077</link><guid isPermaLink="true">https://forum.mango-os.com/post/28077</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Tue, 12 Dec 2023 09:29:23 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Tue, 12 Dec 2023 07:58:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a></p>
<p dir="auto">Sorry but my knowledge of Linux is limited.<br />
I put all the files in the right place and then used the docker file to install mango. Have I forgotten something or done it wrong?</p>
]]></description><link>https://forum.mango-os.com/post/28073</link><guid isPermaLink="true">https://forum.mango-os.com/post/28073</guid><dc:creator><![CDATA[Mark]]></dc:creator><pubDate>Tue, 12 Dec 2023 07:58:45 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Mon, 11 Dec 2023 00:44:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mark" aria-label="Profile: Mark">@<bdi>Mark</bdi></a> I'd ensure all path variables are correct first.</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28070</link><guid isPermaLink="true">https://forum.mango-os.com/post/28070</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Mon, 11 Dec 2023 00:44:14 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Sun, 10 Dec 2023 21:46:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mattfox" aria-label="Profile: MattFox">@<bdi>MattFox</bdi></a></p>
<p dir="auto">I used your dockerfile to install mango but I get the following error message when starting the container:</p>
<p dir="auto">Error: Could not find or load main class com.serotonin.m2m2.Main<br />
Caused by: java.lang.ClassNotFoundException: com.serotonin.m2m2.Main</p>
<p dir="auto">Do you know how I can solve this?</p>
]]></description><link>https://forum.mango-os.com/post/28069</link><guid isPermaLink="true">https://forum.mango-os.com/post/28069</guid><dc:creator><![CDATA[Mark]]></dc:creator><pubDate>Sun, 10 Dec 2023 21:46:32 GMT</pubDate></item><item><title><![CDATA[Reply to Docker and Mango v5.0.2 on Fri, 22 Sep 2023 05:08:34 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jdiaz-co" aria-label="Profile: Jdiaz-co">@<bdi>Jdiaz-co</bdi></a> mango starts with ssl on by default for fresh installs. I'd advise generating a mango.properties file with all of your preferred settings and loading that into your image.<br />
Secondly, ensure you've exposed the ports needed to view mango on 8080 or 8443 if you do go with the SSL route...</p>
<p dir="auto">Let me know how you get on</p>
<p dir="auto">Fox</p>
]]></description><link>https://forum.mango-os.com/post/28010</link><guid isPermaLink="true">https://forum.mango-os.com/post/28010</guid><dc:creator><![CDATA[MattFox]]></dc:creator><pubDate>Fri, 22 Sep 2023 05:08:34 GMT</pubDate></item></channel></rss>