From 72d96941a739a7bc32d1a22242a263f7e1cda31c Mon Sep 17 00:00:00 2001 From: idk Date: Mon, 5 Jul 2021 13:28:21 -0400 Subject: [PATCH] Add a page for Docker installs --- i2p2www/pages/downloads/docker.html | 90 +++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 i2p2www/pages/downloads/docker.html diff --git a/i2p2www/pages/downloads/docker.html b/i2p2www/pages/downloads/docker.html new file mode 100644 index 00000000..b98545c0 --- /dev/null +++ b/i2p2www/pages/downloads/docker.html @@ -0,0 +1,90 @@ +{% extends "global/layout.html" %} +{% block title %}Docker{% endblock %} +{% block accuratefor %}0.9.50{% endblock %} +{% block content %} +

{% trans -%}Installing I2P in Docker{%- endtrans %}

+

{% trans -%}Building an image{%- endtrans %}

+

{% trans -%}There is an i2P image available over at DockerHub. If you do not want to use that one, you can build one yourself:{%- endtrans %}

+
docker build -t i2p .
+

{% trans -%}Running a container{%- endtrans %}

+

{% trans -%}Volumes{%- endtrans %}

+

{% trans -%}The container requires a volume for the configuration data to be mounted. Optionally, you can mount a separate volume for torrent (“i2psnark”) downloads. See the example below.{%- endtrans %}

+

{% trans -%}Memory usage{%- endtrans %}

+

{% trans -%}By the default the image limits the memory available to the Java heap to 512MB. You can override that with the JVM_XMX environment variable.{%- endtrans %}

+

{% trans -%}Ports{%- endtrans %}

+

{% trans -%}There are several ports which are exposed by the image. You can choose which ones to publish depending on your specific needs.{%- endtrans %}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{% trans -%}Port{%- endtrans %}{% trans -%}Description{%- endtrans %}{% trans -%}TCP/UDP{%- endtrans %}
4444{% trans -%}HTTP Proxy{%- endtrans %}{% trans -%}TCP{%- endtrans %}
4445{% trans -%}HTTPS Proxy{%- endtrans %}{% trans -%}TCP{%- endtrans %}
6668{% trans -%}IRC Proxy{%- endtrans %}{% trans -%}TCP{%- endtrans %}
7654{% trans -%}I2CP Protocol{%- endtrans %}{% trans -%}TCP{%- endtrans %}
7656{% trans -%}SAM Bridge TCP{%- endtrans %}{% trans -%}TCP{%- endtrans %}
7657{% trans -%}Router console{%- endtrans %}{% trans -%}TCP{%- endtrans %}
7658{% trans -%}I2P Site{%- endtrans %}{% trans -%}TCP{%- endtrans %}
7659{% trans -%}SMTP Proxy{%- endtrans %}{% trans -%}TCP{%- endtrans %}
7660{% trans -%}POP Proxy{%- endtrans %}{% trans -%}TCP{%- endtrans %}
12345{% trans -%}I2NP Protocol{%- endtrans %}{% trans -%}TCP and UDP{%- endtrans %}
+

{% trans -%}You probably want at least the Router Console (7657) and the HTTP Proxy (4444). If you want I2P to be able to receive incoming connections from the internet, and hence not think it’s firewalled, publish the I2NP Protocol port (12345) - but make sure you publish to a different random port, otherwise others may be able to guess you’re running I2P in a Docker image.{%- endtrans %}

+

{% trans -%}Example{%- endtrans %}

+

{% trans -%}Here is an example container that mounts i2phome as home directory, i2ptorrents for torrents, and opens HTTP Proxy, IRC, Router Console and I2NP Protocols. It also limits the memory available to the JVM to 256MB.{%- endtrans %}

+
docker run \
+    -e JVM_XMX=256m \
+    -v i2phome:/i2p/.i2p \
+    -v i2ptorrents:/i2psnark \
+    -p 4444:4444 \
+    -p 6668:6668 \
+    -p 7657:7657 \
+    -p 54321:12345 \
+    -p 54321:12345/udp \  # I2NP port needs TCP and UDP.  Change the 54321 to something random, greater than 1024.
+    i2p:latest
+{% endblock %}