├── Dockerfile └── README.md /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | MAINTAINER Mikal "Meeh" Villa "mikal@privacysolutions.no" 3 | 4 | # make sure the package repository is up to date 5 | RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 67ECE5605BCF1346 6 | RUN echo "deb http://deb.i2p2.no/ trusty main" >> /etc/apt/sources.list.d/i2p.list 7 | RUN apt-get update 8 | 9 | RUN apt-get -y --force-yes install i2p 10 | RUN sed -i s/RUN_DAEMON=\"false\"/RUN_DAEMON=\"true\"/ /etc/default/i2p 11 | RUN /etc/init.d/i2p start 12 | RUN echo "i2cp.tcp.bindAllInterfaces=true" >> /var/lib/i2p/i2p-config/router.config 13 | # Allows docker to NAT the port 14 | RUN sed -i s/::1,127.0.0.1/0.0.0.0/ /var/lib/i2p/i2p-config/clients.config 15 | 16 | # Allow persistent config 17 | VOLUME ["/var/lib/i2p/i2p-config"] 18 | 19 | EXPOSE 7657 20 | EXPOSE 4444 21 | EXPOSE 4445 22 | CMD /etc/init.d/i2p start && tail -f /var/log/i2p/wrapper.log 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-i2p 2 | =========== 3 | 4 | This docker file will download I2P from deb.i2p2.no and install it into a container. 5 | 6 | This script will install the current I2P version released when you build the docker image. 7 | 8 | How to install and run 9 | ======================= 10 | 11 | Download from docker hub, or github 12 | 13 | ``` 14 | $ docker pull meeh/i2p # from docker 15 | $ git clone https://github.com/PrivacySolutions/docker-i2p.git # from github 16 | ``` 17 | 18 | Ignore the two first lines if you downloaded from docker and not github. 19 | 20 | ``` 21 | # cd docker-i2p 22 | # docker build -t i2p . 23 | # docker run -p 7657:7657 i2p 24 | ``` 25 | 26 | Then the console should be accessable from your docker server! 27 | 28 | Persistent Storage 29 | =================== 30 | 31 | This is how I run it myself, with the -p I "map" the TCP port to the docker server, and with the 32 | -v I added persistent storage. 33 | 34 | 35 | ``` 36 | 37 | docker run -p 7657:7657 -v /data/docker-persistent/i2p/config:/var/lib/i2p/i2p-config:rw meeh/i2p:v1 38 | 39 | ``` 40 | 41 | 42 | --------------------------------------------------------------------------------