ipfs / go-ds-s3

An s3 datastore implementation
MIT License
239 stars 66 forks source link

Add Docker support #245

Closed koxon closed 1 year ago

koxon commented 1 year ago

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[bot] commented 1 year ago

Thank you for submitting this PR! A maintainer will be here shortly to review it. We are super grateful, but we are also overloaded! Help us by making sure that:

Getting other community members to do a review would be great help too on complex PRs (you can ask in the chats/forums). If you are unsure about something, just leave us a comment. Next steps:

We currently aim to provide initial feedback/triaging within two business days. Please keep an eye on any labelling actions, as these will indicate priorities and status of your contribution. We are very grateful for your contribution!

koxon commented 1 year ago

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

aschmahmann commented 1 year ago

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

koxon commented 1 year ago

I made the recommended changes

lidel commented 1 year ago

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

koxon commented 1 year ago

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

Will look into it now

koxon commented 1 year ago

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 commented 1 year ago

@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.

hacdias commented 1 year ago

Thanks, it seems to work.