Closed ShrirajHegde closed 3 weeks ago
@diva-exchange Can you provide the Dockerfile
and entrypoint.sh
for divax/i2p:current-i2p-tor
image?
Hey @diva-exchange, I got the entrypoint.sh from your image and modified the Dockerfile to include tor.
It is better to keep them in the same branch, as branches are not recommended for this purpose. It is easier to build or maintain using a single branch.
I have pushed Dockerfile-tor and entrypoint-tor.sh. I have also optimized the Dockerfiles for size and build speed. Build the images and check for yourself.
Not only that, but I have carefully made changes that they do not change any behaviors. This is a great image for quickly setting up i2p. I have a few more changes related to config to make it even better.
When making a push to docker hub next time, consider building multi-platform images like this https://hub.docker.com/r/shrirajhegde/i2pd-tor/tags so it works on ARM platforms too.
Let me know if you want any more information.
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
docker buildx build . \
--platform linux/arm64,linux/amd64,linux/arm/v7 \
-t shrirajhegde/i2pd-tor --push -f Dockerfile-tor
See that I am specifying all the platform and the specific docker file. https://hub.docker.com/r/shrirajhegde/i2pd-tor
When it's built like this, if you do shrirajhegde/i2pd-tor:latest
, your system will choose the architecture accordingly with no changes to docker compose or the docker run command.
For non tor variant, I do
docker buildx build . \
--platform linux/arm64,linux/amd64,linux/arm/v7 \
-t shrirajhegde/i2pd --push -f Dockerfile
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 latest
and git-<commit_hash>
of i2pd repo.
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.
Fixes #5 without breaking any previous behaviour.
Also fixes #7. https://github.com/ShrirajHegde/i2pd/commit/166a34e777de10bb6019fb1e1d4e54f54bac39ff#r143904943