Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker instructions out of date #41

Closed
Aarkon opened this issue Feb 27, 2023 · 7 comments
Closed

Docker instructions out of date #41

Aarkon opened this issue Feb 27, 2023 · 7 comments

Comments

@Aarkon
Copy link

Aarkon commented Feb 27, 2023

Greetings and thank you for your great work!

I have to report that I ran into issues with Docker and docker-compose lately, and I hope I‘m in the right spot here to address what I found.

So when updating today after some weeks of operation, my whole setup basically died. As I found out, the reason is that I‘m told e.g. here to mount my config to /i2p/.i2p, but now everything sits directly in /i2p inside the container. So I ended up with an ignored folder where my config etc. sits and stuff like router.config is duplicated in i2p but only contains very brief defaults, so nothing works.

Pinning the image in my docker-compose.yaml like so does the trick for now: image: geti2p/i2p:i2p-i2p-2.1.0 This way though, I‘m cut off from updates etc., so I‘d rather know how I‘m supposed to mount my config etc. into the container - over time, my .i2p folder accumulated some stuff and mounting every file manually into the container doesn‘t seem feasible to me.

Again, thanks for the effort of maintaining this for already two decades, and regards!

@Aarkon
Copy link
Author

Aarkon commented Feb 28, 2023

The general idea was that you would store your config directories on a docker mount and just update the entire image.

Thanks for tuning in! Updating the entire image is just what I did. My compose file is pretty much identical to the one from the docs, but for the sake of completeness (just adapted the paths I mount into the container slightly for public display), let me clarify:

version: "3.5"
services:
  i2p:
    container_name: i2p
    restart: unless-stopped
    image: geti2p/i2p:i2p-i2p-2.1.0
    volumes:
      - "config/i2p:/i2p/.i2p"
      - "torrents:/i2psnark"
    ports:
      - 54321:12345
      - 54321:12345/udp
      - 4444:4444
      - 4445:4445
      - 7657:7657

With that Image, the onlyrouter.config lives in /i2p/.i2p like it used to be. When unpinning the version by changing the image tag to just image: geti2p/i2p and updating with docker-compose pull, I get the above issue where the service in the container expects to find the router.config directly under /i2p and gives me a file with merely three lines of content, listing only a few default port configurations.

@TheGreatestJannet
Copy link

TheGreatestJannet commented Mar 18, 2023

Can we reopen this? It looks like that commit didn't solve the issue. If I use anything newer that geti2p/i2p:i2p-i2p-2.1.0 the webui is not available on 7657. Rolling back to 2.1.0 without changing anything in the config fixes the issue.

version: "3.5"
services:
    i2p:
        image: geti2p/i2p:i2p-i2p-2.1.0
        ports:
            - 4444:4444
            - 7657:7657
            - 4445:4445
            - 6668:6668
            - 54321:12345
            - 54321:12345/udp
        volumes:
            - ./i2pconfig:/i2p/.i2p
            - ./i2ptorrents:/i2psnark
        environment:
            - IP_ADDR=0.0.0.0
        restart: unless-stopped

@eyedeekay
Copy link
Contributor

Reopening because people are still reporting it, not sure what's going on yet as it is working for me at the moment.

@eyedeekay eyedeekay reopened this Mar 19, 2023
@i2p i2p deleted a comment from zlatinb Mar 19, 2023
@eyedeekay
Copy link
Contributor

Please test using the latest checkin:

git clone https://github.com/i2p/i2p.i2p
cd i2p.i2p
docker build -t geti2p/i2p .

and run with:

version: "3.5"
services:
    i2p:
        image: geti2p/i2p
        ports:
            - 4444:4444
            - 7657:7657
            - 4445:4445
            - 6668:6668
            - 54321:12345
            - 54321:12345/udp
        volumes:
            - ./i2pconfig:/i2p/.i2p
            - ./i2ptorrents:/i2psnark
        environment:
            - IP_ADDR=0.0.0.0
        restart: unless-stopped

@bedaro
Copy link

bedaro commented Mar 23, 2023

I think the problem is in startapp.sh. Near the bottom, the variable JAVAOPTS is defined but then JAVA_OPTS is referenced. This causes the jar to be started without a i2p.dir.config set, and a bunch of configuration gets created at /root/.i2p instead of at /i2p/.i2p. A router.config gets created there instead, while other stuff still gets referenced in /i2p/.i2p.

When I go into the docker image and remove the underscore from JAVA_OPTS it works as expected.

@eyedeekay
Copy link
Contributor

Oops, here I am with the fix not checked in. That doesn't do anybody any good. Sorry guys about that, thanks @bedaro for calling my attention to it.

@bedaro
Copy link

bedaro commented Mar 24, 2023

The latest image worked on my existing config without modification. I haven't tested with a clean slate though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants