-
Notifications
You must be signed in to change notification settings - Fork 8
Make /home/i2pd mountable as a docker volume #10
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
Conversation
Store the files in /i2pd and copy them to /home/i2pd on entrypoint. This enables us to mount /home/i2pd/conf and /home/i2pd/data as docker volumes for persistance and easier editing of the config file.
- Split Dockerfile into more steps for optimal build caching. - Move COPY statements just before use for optimal build caching. - Build with `make -j nproc` to compile in parallel for faster compilation.
This makes it easier for users to edit i2pd.conf file when mounted to host directory.
… in the container
Runs i2pd from /i2pd/bin/i2pd instead of /home/i2pd/bin/i2pd
- Manually create /home/i2pd/
…ally set in the container" This reverts commit 829e360. I missed that divax/i2p:current-i2p-tor has a separate Dockerfile and entrypoint script
@diva-exchange Can you provide the |
Reduce image size by building outside the image.
Hey @diva-exchange, I got the entrypoint.sh from your image and modified the Dockerfile to include tor.
Let me know if you want any more information. |
d28cb3c
to
ec5a965
Compare
085b3fb
to
d109f06
Compare
ed73219
to
8e07943
Compare
8e07943
to
0dc227a
Compare
Thank you - great feedback and great changes. Merged it and will test it with i2pd 2.54.0. One question remains: How to do build multi-platform images? Can this be included in the build.sh script? |
@diva-exchange, yes. I can build and push by
See that I am specifying all the platform and the specific docker file. When it's built like this, if you do For non tor variant, I do
https://hub.docker.com/r/shrirajhegde/i2pd/tags But I would advice you to use GitHub actions like I do. I have set it up to build the image every week automatically. And the new image will be tagged with It runs weekly at 9AM UTC : https://github.com/ShrirajHegde/i2pd/actions. |
Let me know if you need help with setting up GitHub actions. It's almost setup. It only requires minor changes and adding your docker secrets to GitHub. |
Great & thanks! Will enable github actions on the main branch. Reason: don't want to push develop branch to docker (since PR's [and also some not-that-well-tested commits] go to develop branch). But tested and approved stuff (which is the main branch) shall be published on docker hub. |
If you need high stability, you need to checkout the latest release tag when building i2pd. They might have commits that are not fully ready to be used too. Let me know if you want to to implement that in the GitHub actions. |
This commit also addresses #6. I am not sure if it fully fixes the issue. |
### Changed - I2Pd v2.54.0 (see ChangeLog-i2pd) - docker improvements, credits and thanks to: #10 - I2Pd has removed dependencies to boost-filesystem and boost-date_time, also removed dependencies from Dockerfile - removed Dockerfile-binary ### Fixed - using tag (like "2.54.0") instead of branch to build i2pd
Add PORT_TOR=9950 in Dockerfile so it doesn't need to be manually set in the container
Fixes #5 without breaking any previous behaviour.
Also fixes #7. ShrirajHegde@166a34e#r143904943