Write README and cleanup inconsistencies

#32 - Docker image
This commit is contained in:
2020-01-13 18:42:30 +01:00
parent e8afe358a5
commit 4eb31c11e3
5 changed files with 61 additions and 11 deletions

View File

@ -23,13 +23,13 @@ RUN ./gradlew --no-daemon clean assemble \
# First dir in tar is the "MuWire-<version>"
&& tar -C /muwire --strip 1 -xvf gui/build/distributions/MuWire*.tar
WORKDIR /muwire
# Cleanup
RUN rm -rf /muwire-tmp /root/.gradle /root/.java
RUN rm -rf ${TMP_DIR} /root/.gradle /root/.java
# Leave only the JRE
RUN apk del openjdk${JDK}-jdk
WORKDIR /muwire
# Maximize only the main/initial window.
RUN \
sed-patch 's/<application type="normal">/<application type="normal" title="MuWire">/' \
@ -49,7 +49,7 @@ ENV APP_NAME="MuWire" \
S6_KILL_GRACETIME=8000
# Define mountable directories.
VOLUME ["/config"]
VOLUME ["/muwire/.MuWire"]
VOLUME ["/output"]

View File

@ -6,7 +6,7 @@ The current stable release - 0.6.8 is avaiable for download at https://muwire.co
You can find technical documentation in the [doc] folder. Also check out the [Wiki] for various other documentation.
### Building
## Building
You need JDK 9 or newer. After installing that and setting up the appropriate paths, just type
@ -21,7 +21,7 @@ If you want to run the unit tests, type
If you want to build binary bundles that do not depend on Java or I2P, see the [muwire-pkg] project
### Running the GUI
## Running the GUI
Type
```
@ -32,20 +32,67 @@ If you have an I2P router running on the same machine that is all you need to do
[Default I2CP port]\: `7654`
### Running the CLI
## Running the CLI
Look inside `cli-lanterna/build/distributions`. Untar/unzip one of the `shadow` files and then run the jar contained inside by typing `java -jar cli-lanterna-x.y.z-all.jar` in a terminal. The CLI will ask you about the router host and port on startup, no need to edit any files. However, the CLI does not have an options window yet, so if you need to change any options you will need to edit the configuration files. The CLI options are documented here [cli options]
The CLI is under active development and doesn't have all the features of the GUI.
### Running the Web UI / Plugin
## Running the Web UI / Plugin
There is a Web-based UI under development. It is intended to be run as a plugin to the Java I2P router. Instructions how to build it are available at the wiki [Plugin] page.
### Translations
## Docker
The Docker image is based on the wonderful work in [jlesage/docker-baseimage-gui].
You can refer to it for environment variables to pass to the container.
If you don't want to use the image on dockerhub, build an image yourself.
```bash
MUWIRE_VERSION=`awk -F "=" '/^version/ { gsub(" ","") ; print $2}' gradle.properties`
docker build -t muwire:latest,muwire:${MUWIRE_VERSION} .
```
**Necessary configuration**
Since MuWire will be running in a container, it won't have direct access to the host's localhost.
By default, it will be configured to use `172.17.0.1` as the target host.
You'll need to open the I2CP port on that interface.
If you're running I2P on the localhost, navigate to http://localhost:7657/configi2cp and make the necessary changes.
![i2cp_config.png]
Should you be using a different interface write an `i2p.properties` and then put that into the shared docker volume.
Example configuration file:
```properties
i2cp.tcp.host=112.13.0.1
```
**Running**
```bash
docker run \
-p 5800:5800 \
-v output:output \
muwire
```
You will then be able to access the muwire GUI over a browser at http://localhost:5800
**Options**
| Option | Description |
|--------------|--------------------------------------------|
|`-v output:output`| The `/output` volume should be used to store MuWire's download/upload data |
|`-v config:/muwire/.MuWire`| This is where the `i2p.properties` and possibly other config should go |
## Translations
If you want to help translate MuWire, instructions are on the wiki https://github.com/zlatinb/muwire/wiki/Translate
### GPG Fingerprint
## GPG Fingerprint
```
471B 9FD4 5517 A5ED 101F C57D A728 3207 2D52 5E41
@ -61,3 +108,5 @@ You can find the full key at https://keybase.io/zlatinb
[cli options]: https://github.com/zlatinb/muwire/wiki/CLI-Configuration-Options
[I2P Github]: https://github.com/i2p/i2p.i2p
[Plugin]: https://github.com/zlatinb/muwire/wiki/Plugin
[i2cp_conf.png]: ./images/i2cp_config.png
[jlesage/docker-baseimage-gui]: https://github.com/jlesage/docker-baseimage-gui

View File

@ -0,0 +1 @@
i2cp.tcp.host=172.17.0.1

View File

@ -1,7 +1,7 @@
#!/bin/sh
# Explicitly define HOME otherwise it might not have been set
export HOME=/config
export HOME=/muwire
echo "Starting MuWire"
exec /muwire/bin/MuWire

BIN
images/i2cp_config.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB