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

Add Docker support #245

Merged
merged 8 commits into from
Jun 12, 2023
Merged

Add Docker support #245

merged 8 commits into from
Jun 12, 2023

Conversation

koxon
Copy link
Contributor

@koxon koxon commented Dec 4, 2022

New folder containing a dockerfile, a 001-config.sh init.d script and a README.md.

The dockerfile compiles Kubo with the go-ds-s3 plugin and installs the new binary and libraries in the final Docker image. We also install jq to manipulate the IPFS config file in the init.d shell script.

Environment variables are expected for the container to run, see the README.

I think this could be an interesting add to the repo. Thoughts?

@welcome

This comment was marked as resolved.

@koxon koxon changed the title Adding Docker support Add Docker support Dec 4, 2022
@lidel lidel requested a review from guseggert February 6, 2023 14:49
docker/001-config.sh Outdated Show resolved Hide resolved
@lidel lidel added the need/author-input Needs input from the original author label Feb 27, 2023
lidel
lidel previously requested changes Mar 20, 2023
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Swarm.ResourceMgr.Limits is being removed in Kubo 0.19 (ipfs/kubo#9603), if you want to adjust libp2p limits, use the upstream API (https://pkg.go.dev/github.com/libp2p/go-libp2p/p2p/host/resource-manager#PartialLimitConfig).

@koxon
Copy link
Contributor Author

koxon commented Mar 28, 2023

ok @lidel and @guseggert. Sorry for the late update here ... I made the changes you requested. Can someone else test it?

docker/001-config.sh Outdated Show resolved Hide resolved
@aschmahmann
Copy link
Contributor

@hacdias is going to give this a run and report back.

@aschmahmann aschmahmann requested review from hacdias and removed request for guseggert May 8, 2023 13:15
Agreed

Co-authored-by: Adin Schmahmann <[email protected]>
@koxon
Copy link
Contributor Author

koxon commented May 9, 2023

I made the recommended changes

Copy link
Member

@hacdias hacdias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not having success running this docker image. I follow your steps and get:

Changing user to ipfs
/usr/local/bin/start_ipfs: line 16: ipfs: not found

Could you please ensure that the Dockerfile is correct and woking properly? Or maybe something's wrong with the instructions, which I followed.

@lidel
Copy link
Member

lidel commented May 15, 2023

@koxon any chance you have time to look into this, to push it over the finish line?

@koxon
Copy link
Contributor Author

koxon commented May 22, 2023

@koxon any chance you have time to look into this, to push it over the finish line?

Will look into it now

@koxon
Copy link
Contributor Author

koxon commented May 24, 2023

Looks like the latest Kubo version v0.20 breaks things for me.
It works on v0.19.2 though so I will target this build for now

@koxon
Copy link
Contributor Author

koxon commented May 24, 2023

@hacdias I made an update to the Dockerfile to target v0.19.2 Kubo Docker image.
I can't make it work with v0.20 for now.

When using v0.20, the ipfs binary somehow doesn't find ipfs ...
Is it calling itself now somehow or is there another ipfs file that needs to be copied after compilation?

My Dockerfile compiles IPFS from the source and I copy the binary from the "builder" Docker stage to the main stage.
I think there are more files to copy in order to support the latest version.

Copy link
Contributor Author

@koxon koxon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your issue should work now. I made new commit to the PR

@hacdias
Copy link
Member

hacdias commented Jun 12, 2023

Thanks, it seems to work.

@hacdias hacdias merged commit f582547 into ipfs:master Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/author-input Needs input from the original author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants