You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: .github/ISSUE_TEMPLATE/bug_report.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,8 @@ about: Report a bug
6
6
7
7
<!--- Remove text and sections that do not apply -->
8
8
The issue tracker is only for reporting bugs or submitting feature requests.
9
-
If you need technical assistance for running a node please consult the #fullnode channel on Discord (https://discord.gg/jrxApWC) or https://forum.helloiota.com/Technology/Help.
10
-
If you have general questions on IOTA you can go to https://iota.stackexchange.com/, https://helloiota.com/, or browse Discord channels (https://discord.gg/C88Wexg).
9
+
If you need technical assistance for running a node please consult the #fullnode channel on Discord (https://discord.iota.org) or https://forum.helloiota.com/Technology/Help.
10
+
If you have general questions on IOTA you can go to https://iota.stackexchange.com/, https://helloiota.com/, or browse Discord channels (https://discord.iota.org).
Copy file name to clipboardExpand all lines: DOCKER.md
+50-23Lines changed: 50 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,13 +2,17 @@
2
2
3
3
Run the official iotaledger/iri container, passing the mandatory -p option:
4
4
5
-
```docker run iotaledger/iri:vX.X.X-RELEASE -p 14265```
5
+
```sh
6
+
docker run iotaledger/iri:vX.X.X-RELEASE -p 14265
7
+
```
6
8
7
-
This will get your a running IRI with its API listening on port 14265, no neighbours and an empty database. The IRI Docker container by default expects data at /iri/data. Use the `-v` option of the `docker run` command to mount volumes so to have persistent data. You can also pass more command line options to the docker run command and those will be passed to IRI.
9
+
This will get your a running IRI with its API listening on port 14265, no neighbours and an empty database. The IRI Docker container by default expects data at `/iri/data`. Use the `-v` option of the `docker run` command to mount volumes so to have persistent data. You can also pass more command line options to the docker run command and those will be passed to IRI.
8
10
9
11
If you want to use a iri.ini file with the docker container, supposing it's stored under /path/to/conf/iri.ini on your docker host, then pass `-v /path/to/conf:/iri/conf` and add -c /iri/conf/iri.ini as docker run arguments. So for example the `docker run` command above would become:
Please refer to the IRI documentation for further command line options and iri.ini options.
14
18
@@ -23,15 +27,29 @@ When building IRI via the Dockerfile provided, Docker 17.05 minimum is required,
23
27
24
28
The built container assumes the WORKDIR inside the container is /iri/data: this means that the database directory will be written inside that directory by default. If a system administrator wants to retain the database across restarts, it is his/her job to mount a docker volume in the right folder.
25
29
26
-
The docker conatiner supports the env variables to configure advanced options. These variables can be set but are not required to run IRI.
30
+
### Advanced Configuration
31
+
32
+
The docker container supports the env variables to configure advanced options. These variables can be set but are not required to run IRI.
33
+
34
+
`JAVA_OPTIONS` these are the java options to pass right after the java command. It must not contain -Xms nor -Xmx. Defaults to a safe value.
35
+
36
+
`JAVA_MIN_MEMORY` the value of -Xms option. Defaults to 2G
37
+
38
+
`JAVA_MAX_MEMORY` the value of -Xmx option. Defaults to 4G
39
+
40
+
`DOCKER_IRI_JAR_PATH` the directory where the IRI jar file is. Defaults to `/iri/target/` as pushed by the Dockerfile. This is useful if custom IRI binaries want to be executed and the default path needs to be overridden.
41
+
42
+
`DOCKER_IRI_JAR_FILE` the IRI jar file name to execute. Defaults to `iri*.jar`
27
43
28
-
`JAVA_OPTIONS`: these are the java options to pass right after the java command. It must not contain -Xms nor -Xmx. Defaults to a safe value
29
-
`JAVA_MIN_MEMORY`: the value of -Xms option. Defaults to 2G
30
-
`JAVA_MAX_MEMORY`: the value of -Xmx option. Defaults to 4G
31
-
`DOCKER_IRI_JAR_PATH`: defaults to /iri/target/iri*.jar as pushed by the Dockerfile. This is useful if custom IRI binaries want to be executed and the default path needs to be overridden
32
-
`DOCKER_IRI_REMOTE_LIMIT_API`: defaults to "interruptAttachToTangle, attachToTangle, addNeighbors, removeNeighbors, getNeighbors"
33
-
`DOCKER_IRI_MONITORING_API_PORT_ENABLE`: defaults to 0. If set to 1, a socat on port 14266 directed to 127.0.0.1:DOCKER_IRI_MONITORING_API_PORT_DESTINATION will be open in order to allow all API calls regardless of the DOCKER_IRI_REMOTE_LIMIT_API setting. This is useful to give access to restricted API calls to local tools and still denying access to restricted API calls to the internet. It is highly recommended to use this option together with docker networks (docker run --net).
44
+
`DOCKER_IRI_REMOTE_LIMIT_API` defaults to "interruptAttachToTangle, attachToTangle, addNeighbors, removeNeighbors, getNeighbors"
34
45
46
+
`DOCKER_IRI_MONITORING_API_PORT_ENABLE` defaults to 0. If set to 1, a socat on port 14266 directed to 127.0.0.1:DOCKER_IRI_MONITORING_API_PORT_DESTINATION will be open in order to allow all API calls regardless of the DOCKER_IRI_REMOTE_LIMIT_API setting. This is useful to give access to restricted API calls to local tools and still denying access to restricted API calls to the internet. It is highly recommended to use this option together with docker networks (docker run --net).
47
+
48
+
`DOCKER_IRI_REMOTE` defaults to "true". This sets the boolean value for the "--remote" command line option. Setting to "false" ensures that the API port binds only to the localhost interface. The setting of "true" lets the API listen on all the interfaces (0.0.0.0). Set this value to "false" if you plan on running the container on the host network and want the API to bind to the localhost interface only. Set this value to false if you want to bind the --api-host (API_HOST) to a specific interface.
49
+
50
+
`DOCKER_JAVA_NET_PREFER_IPV4_STACK` defaults to "true". This sets the boolean value for the -Djava.net.preferIPv4Stack option. To be able to use IPv6 make sure to set this to false.
51
+
52
+
### Entrypoint
35
53
The container entry point is a shell script that performs few additional steps before launching IRI:
36
54
- verifies if `DOCKER_IRI_MONITORING_API_PORT_ENABLE` is set to 1
37
55
- launches IRI with all parameters passed as desired
@@ -40,7 +58,8 @@ It is important to note that other than --remote and --remote-limit-api "$DOCKER
40
58
41
59
**At the time of writing, IRI requires -p to be passed either via INI or via command line. The entrypoint of this docker container does not do that for you.**
42
60
43
-
Here is a systemd unit example you can use with this Docker container. This is just an example and customisation is possible and recommended. In this example the docker network iri must be created and the paths /mnt/iri/conf and /mnt/iri/data are used on the docker host to serve respectively the neighbors file and the data directory. No INI files are used in this example, instead options are passed via command line options, such as --testnet and --zmq-enabled.
61
+
### Systemd Unit
62
+
Here is a systemd unit example you can use with this Docker container. This is just an example and customisation is possible and recommended. In this example the paths `/mnt/iri/conf` and `/mnt/iri/data` are used on the docker host to serve respectively the neighbors file and the data directory. No INI files are used in this example, instead options are passed via command line options, such as `--testnet true` and `--zmq-enabled false`.
44
63
45
64
```
46
65
[Unit]
@@ -53,22 +72,30 @@ TimeoutStartSec=0
53
72
Restart=always
54
73
ExecStartPre=-/usr/bin/docker rm %n
55
74
ExecStart=/usr/bin/docker run \
56
-
--name %n \
57
-
--hostname iri \
58
-
--net=iri \
59
-
-v /mnt/iri/conf:/iri/conf \
60
-
-v /mnt/iri/data:/iri/data \
61
-
-p 14265:14265 \
62
-
-p 15600:15600 \
63
-
-p 14600:14600/udp \
64
-
iotaledger/iri:vX.X.X-RELEASE \
65
-
-p 14265 \
66
-
--zmq-enabled \
67
-
--testnet
75
+
--name %n \
76
+
--hostname iri \
77
+
--user=1000 \
78
+
--net=host \
79
+
--cap-drop=ALL
80
+
-v /mnt/iri/conf:/iri/conf \
81
+
-v /mnt/iri/data:/iri/data \
82
+
-e DOCKER_IRI_REMOTE=true \
83
+
iotaledger/iri:vX.X.X-RELEASE \
84
+
--port 14265 \
85
+
--zmq-enabled false \
86
+
--testnet false
68
87
69
88
ExecStop=/usr/bin/docker stop %n
70
89
ExecReload=/usr/bin/docker restart %n
71
90
72
91
[Install]
73
92
WantedBy=multi-user.target
74
93
```
94
+
95
+
## Security Considerations
96
+
97
+
It is highly recommended to run IRI with an unprivileged user and not as user `root`.
98
+
99
+
An unprivileged user can be created on the host and the UID passed to the docker command (e.g. `--user 1001`). Directories that are mounted to the container from the host should be owned by this user.
100
+
101
+
In addition the `--cap-drop=ALL` passed to docker restricts process capabilities and adheres to the principle of least privilege. See https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities for more information.
0 commit comments