在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:ipfs-shipyard/ipfs-snap开源软件地址:https://github.com/ipfs-shipyard/ipfs-snap开源编程语言:Dockerfile 100.0%开源软件介绍:Build and publish go-ipfs as a snap packageSnap is the default package manager for ubuntu since the release of 20.04. This repo captures what we know about building go-ipfs as a snap packge and publishing it to the snapstore. WARNING The IPFS core team do not maintain the ipfs snap (yet). The official source for go-ipfs is https://dist.ipfs.io/#go-ipfs and the recommended install path is here https://docs.ipfs.io/install/command-line-quick-start/ Known issues
ubuntu@primary:~$ ipfs mount
2020-07-10T09:54:17.458+0100 ERROR node node/mount_unix.go:91 error mounting: fusermount: exec: "fusermount": executable file not found in $PATH
2020-07-10T09:54:17.463+0100 ERROR node node/mount_unix.go:95 error mounting: fusermount: exec: "fusermount": executable file not found in $PATH RequirementsYou need # ubuntu or similar
$ snap install snapcraft --classic
# macos
$ brew install snapcraft UsageBuild out a snap package for go-ipfs by running the following from this project $ snapcraft Test the built snap package by installing it on a system that has
You can test it out on mac too. By installing and using # install your .snap in a multipass vm
$ multipass shell
ubuntu@primary:~$ cd ~/Home/path/to/snap/on/host/filesystem
ubuntu@primary:~$ snap install ipfs_<snap details>.snap --devmode --dangerous
ubuntu@primary:~$ ipfs daemon
Initializing daemon...
go-ipfs version: 0.7.0-dev Publish the snap to offical snapstore will be automated by https://snapcraft.io/build. To promote a release or edit the workflow, you'll need to create an accoung on snapcraft, then request to be added as a maintainer by opening an issue on this repo. Then you can publish from the command line by $ snapcraft upload ipfs-<snap version>.snap Note, you need to login via $ snapcraft upload ipfs-0.7.0-rc1_amd64.snap --release beta NotesTo build from source or from offical tarThe snapcraft.yml in this repo will build go-ipfs from source. This allows the snapcraft building service to compile it for different architectures. Snap also supports wrapping pre-built binaries, and a example of that is included as This option is included in case we run into issues with building snaps from source, or want to ensure the packages only use official artefacts. It requires no special dockerfile, the existing VersioningSnaps have a human readable version property e.g. The well trodden path in snap world is to hardcode the human readable version of the snap into the snapcraft.yml The other option is to use the The progamatic solution is enticing, but I'm currently hitting an issue where the master branch of go-ipfs is not building, and it's not clear how to set the source-tag correctly for the pull if you dont already have the source. Snap isolation and the ipfs repoNew versions of the same snap are isolated from each other, allowing nice things like rollback of updates. In the case of IPFS though, the peerId, pins, and all locally cached blocks are stored in the repo, and the app takes care of upgrading the repo as the format changes, so it's more useful to allow new versions of the ipfs snap to be able to re-use the same repo. This was raised as a user issue in elopio/ipfs-snap#12. That snaps auto-update when a new release is available makes this even more of an issue. The prefered solution in snap world, as pointed out by @jamiew and @mkg20001 is to use the Building in dockerThis repo includes a Dockerfile that creates an image that can build go-ipfs from source and package it as a snap. It starts with $ docker run -v $(pwd):/my-snap ipfs/ipfs-snap-builder:latest sh -c "apt update && cd /my-snap && snapcraft --debug" To update the Dockerfile (e.g to keep the go version provided in sync with https://github.com/ipfs/go-ipfs/blob/master/Dockerfile#L1) you need to rebuild the image, tag it, and publish it to dockerhub
CreditsMany thanks to
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论