Commit Graph

18 Commits

Author SHA1 Message Date
filipremb
78a2f2cf24 fix(docker): inlude symlinks in scanning for init scripts (#11077)
(cherry picked from commit 72f4c6f029)
2025-11-26 21:06:23 +01:00
Piotr Galar
c5868a86be
refactor(ci): simplify Dockerfile and add docker image testing (#10021) 2023-07-27 19:53:24 +02:00
Caian Benedicto
63b0025664
feat(docker): /container-init.d for advanced initialization (#6577)
* 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>
2022-04-12 19:44:03 +02:00
Caian
427205c1b6 Add swarm key variables to container daemon
License: MIT
Signed-off-by: Caian Benedicto <caianbene@gmail.com>
2019-08-02 16:28:12 -03:00
kpcyrd
9317649c33 Dockerfile: Remove 2 year old deprecation warning
License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2019-04-05 14:10:00 +02:00
Antti Kaihola
821982e96a docker: Quote ipfs init args in the container_daemon shell script
License: MIT
Signed-off-by: Antti Kaihola <antti+ipfs@kaihola.fi>
2018-09-26 11:06:54 +03:00
Antti Kaihola
df7c1fcc97 docker: allow IPFS_PROFILE to choose the profile for ipfs init
License: MIT
Signed-off-by: Antti Kaihola <antti+ipfs@kaihola.fi>
2018-09-19 23:33:16 +03:00
Massino Tinovan
36674b9c90 Remove reference to "this PR" in code
License: MIT
Signed-off-by: Massino Tinovan <massino@droppod.io>
2017-11-10 17:28:06 -08:00
Lars Gierth
e2a3cd3b66 docker: switch from musl to glibc
The Dockerfile now has two stages: build and assembly.
This allows for a full-fledged debian build container,
while still resulting in a super-thin busybox image.

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2017-09-13 15:49:34 +02:00
kpcyrd
3c96b09ae7 docker: Automatically fix permissions
This patch is delaying the point where permissions are dropped into the `start_ipfs` script. This way, instead of exiting on permission issues, we can fix them on our own inside the script, then drop privileges and continue doing ipfs specific stuff with the correct user.

I've removed the `chmod 0777` step from the readme since it's not needed anymore.

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2017-03-03 21:10:02 +01:00
kpcyrd
04c95fa9d0 Mention the new PR as well
License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2017-02-12 20:58:25 +00:00
kpcyrd
77e4c64ac0 Dockerfile: Deprecate implicit daemon argument
After the discussion in https://github.com/ipfs/go-ipfs/pull/3573 this patch prints a deprecation warning if:

1) the image has been executed with additional arguments
2) the first argument isn't daemon

This way people are able to migrate to the new syntax without any breaking changes.

License: MIT
Signed-off-by: kpcyrd <git@rxv.cc>
2017-02-12 20:53:19 +00:00
Lars Gierth
108bc9f5bf docker: allow passing options to daemon
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-07-08 03:23:35 +02:00
Lars Gierth
50127b2f58 docker: start daemon with --enable-gc
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-03-21 12:39:53 -04:00
Lars Gierth
81c8cffee9 Rework the Dockerfile
- Have two Dockerfiles doing essentially the same,
  but optimized for build time (for tests)
  and image size (for Docker Hub)
- Fetch gx dependencies
- Expose port 4002 for utp
- Specify go version, currently 1.5.3-r0
- Create ephemeral fs-repo if none is mounted
- Have t0300-docker-image actually test IPFS, not just an echo
- Make everything a bit less hardcoded
- Remove dead shacheck

License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
2016-02-04 10:46:26 -08:00
Knut Ahlers
1cdafc7146 Use exec to start IPFS daemon
This incorporates feedback from @RX14 in #1685 and might fix #1537 as the ipfs daemon would get the stop signal from the docker daemon... Maybe that way it stops in a cleaner manner...

License: MIT
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2015-09-15 11:30:20 +02:00
Knut Ahlers
3534b039f7 Improve Dockerfile
* Added VOLUME to enable users to keep a state of the repo outside the container
* Added ipfs user to let ipfs run as a normal user and not as root
* Set IPFS_PATH to push IPFS to use the exposed dir
* Improved start script to be more verbose about errors
2015-04-23 23:54:32 +02:00
Knut Ahlers
ab28018f8c Moved the container startup script to bin 2015-02-23 00:16:38 +01:00