* feat: update to Go 1.26
replace deprecated httputil.NewSingleHostReverseProxy (Director)
with ReverseProxy.Rewrite, switch math/rand to math/rand/v2 in
production code, update Dockerfile base image.
* fix test to accept response with HTTP status of 307 and 308 where 302 and 301 are expected
---------
Co-authored-by: Andrew Gillis <11790789+gammazero@users.noreply.github.com>
* feat(ci): docker linting
adds hadolint to validate dockerfile best practices
configures project-specific rules in .hadolint.yaml
* fix(ci): enable hadolint console output
adds verbose and tty format to see linting results in CI logs
* test: trigger hadolint warning
remove --no-install-recommends to test CI output
* fix(ci): fail hadolint on warnings
stricter linting to catch all best practice violations
* fix: add --no-install-recommends to apt-get
reduces image size by avoiding unnecessary packages
* refactor: use WORKDIR instead of cd in dockerfile
replaces cd commands with WORKDIR for cleaner dockerfile
removes unnecessary hadolint ignore rules DL3003 and DL3009
* chore: simplify hadolint config
removes unnecessary override rules for cleaner config
* fix(ci): pass -buildvcs=false to go list in Makefile
Docker builds were failing because go list commands in mk/golang.mk
didn't inherit GOFLAGS from the environment, causing empty package
names when .git directory was incomplete.
This issue always existed but was masked until recent changes in
GitHub Actions runners or Docker golang image exposed it.
* fix(ci): use modern ENV key=value format in Dockerfile
Fixes Docker build deprecation warnings.
- Bumps golangci-lint to work for the new Go version
- Removes rand.Seed, which has been deprecated. It is seeded by default
with a random value since Go 1.20.
- Replaces deprecated Fuse errors with syscall.Errno
When running the health check command without passing the `--api` command line flag and if the Kubo daemon is not active, executing `ipfs dag stat` will initialize the repository. It is common for the health check command to be run with root privileges. As a result, the repository will be owned by the root user. Then, if the Kubo daemon process attempts to access the repository later on, it will encounter a permission denied error because it runs as a non-privileged user by default.
Hence, this modification simply provides the `--api` flag to the `ipfs dag stat` command. Given that we are operating within the limited confines of a docker container, we can make a few assumptions. I can't come up with a scenario where one would desire to assign a different port to the internal API rather than using the default 5001. Therefore, I have hard-coded the value accordingly.
trying two things:
- speed up arm build by allowing cross-comp from go instead of slow QEMU
- take a stab at caching buildx layers, without infinite growth
This fix was laready applied in
14cfa48bed
and reduced build time from 20m to 3m.
This ensures we keep publishing the same image under both names:
$ ./bin/get-docker-tags.sh $(date -u +%F) 88d88158c master ...chore/rename-to-banana
ipfs/kubo:master-2022-06-21-88d8815
ipfs/go-ipfs:master-2022-06-21-88d8815
ipfs/kubo:master-latest
ipfs/go-ipfs:master-latest
* Add initialization directory support to Docker image
* Add sharness test, fix bugs in init script
Fixed in init script:
- Added some missing quotes around expansions
- Fixed INIT_ARGS to not pass any args if IPFS_PROFILE isn't specified
- Use printf instead of "echo -e"
- Only run scripts in top-level of init dir
- Handle filenames correctly when finding init scripts (by using find + xargs)
* chore: docker cleanup
cleans up containers and images (useful when run on developer machine)
* remove container init documentation from README
There is already IPFS Docker documentation where this should live:
https://docs.ipfs.io/how-to/run-ipfs-inside-docker/
Co-authored-by: Caian <caian@ggaunicamp.com>
Co-authored-by: Marcin Rataj <lidel@lidel.org>
Co-authored-by: Gus Eggert <gus@gus.dev>
Simplify keeping the snap package up to date by including the snapcraft.yaml in the repo.
We can then wire up the snapstore to autobuild the package for amd64,i386,arm* etc.
Many thanks to @elopio for the work of getting ipfs into the snap store in the first place, and to @bertrandfalguiere and @mkg20001 for pushing it forwards.
See: https://github.com/ipfs-shipyard/ipfs-snap for more info.
Fixes#7250
WIP #3595
License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>