Commit Graph

20 Commits

Author SHA1 Message Date
Hector Sanjuan
b1da448418
Docker: support multiarch builds (#1984)
General alignment with Kubo and other projects

- Switch to Alpine for final image
- Switch to Github Actions for building and pushing
2023-10-12 17:32:09 +02:00
Hector Sanjuan
be612bc91d Docker: use more recent versions
Use gosu and tini from debian packages for the main container.
2023-08-10 22:52:30 +02:00
Hector Sanjuan
74e4dfb2e4 Docker: allow controlling datastore backend via IPFS_CLUSTER_DATASTORE 2021-06-29 15:44:24 +02:00
Hector Sanjuan
4556cbe726 Docker: improve for CRDTs
This:

  * Allows choosing the consensus for the automatic "init" on Docker with
  IPFS_CLUSTER_CONSENSUS.

  * Removes IPFS_PATH and the sed replacements for 0.0.0.0 on RestAPI and
  Ipfsproxy endpoints because these are easily supported by setting env vars
  correctly and pose some security risk when running with net=host.

  * Brings up to date Dockerfile-test and Dockerfile-bundle, even if mostly
  unused.
2019-08-13 19:32:38 +02:00
Hector Sanjuan
063c5f1b78 Service: Select consensus on "init" (not on "daemon")
Fixes #865.

This makes the necessary changes so that consensu is selected on "init" with a
flag set, by default, to "crdt". This generates only a "crdt" or a "raft"
section, not both.

If the configuration file has a "raft" section, "raft" will be used to start
the daemon. If it has a "crdt" section, "crdt" will be used. If it has none or
both sections, an error will happen.

This also affects "state *" commands, which will now autoselect how to work
from the existing configuration.
2019-08-09 19:20:53 +02:00
Hector Sanjuan
6188d6ff52 service: Make --consensus a mandatory flag
It has a few implications to launch a raft peer when you wanted to do crdt and vice-versa.

Same when exporting and exporting states.

Users starting cluster peers should be explicit about their consensus choice.

Also, if we ever want to make `crdt` the default, we can't do that before
making `raft` non-default first. I don't like to break things but otherwise
the experience for new users wanting to try crdts might be aweful.
2019-07-26 18:15:41 +02:00
Hector Sanjuan
2fa41e72f9 Docker: Run with daemon --upgrade by default.
Plus add some warnings for users running the container randomly.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2018-04-27 07:57:08 +02:00
Hector Sanjuan
d6800045b5 Dockerfile: Remove ipfs from container
The main container will now run only ipfs-cluster-service.

A new ipfs-cluster-bundle container is built by Dockerfile-bundle
which will provide ipfs-cluster+ipfs.

Fixes #197

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-11-29 10:34:03 +01:00
Hector Sanjuan
fb7be4137f Fix #216: Docker does not like an env variable in CMD (anymore?)
This used to work. Even if it's been surfaced by 4a8759939 we were
extensively testing the Dockerfile before that release.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-31 11:46:32 +01:00
Hector Sanjuan
fe815bb9dc Use sh for docker test scripts
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-21 00:11:47 +02:00
Hector Sanjuan
1d256166d6 Fix #154: Update Dockerfiles
After changes on how the final docker image for go-ipfs is generated,
our Dockerfiles failed to build.

The new version is inspired on go-ipfs Dockerfile. It takes advantage
of docker >= v17.06 which allows multi-stage Dockerfiles with
several FROM directives and COPY --from. This allows build freely on a
first stage, without thinking of cleaning up, and then just copy the
final artifacts to a second, minimal image.

The Dockerfile-test is similarly updated. Minor changes have been
applied to the entrypoints.

License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-10-20 20:51:19 +02:00
Wyatt
0cd8e447c4 Touching up cluster restart to wait for listener clean up more effectively 2017-10-11 13:18:46 -04:00
Wyatt
67d38a06c4 Using shadow to actually save bootstrapper, updating cluster restart to respect saved config for tests 2017-10-11 11:09:39 -04:00
Wyatt
e533eb74f3 set cluster secret to empty in restart 2017-09-21 19:05:25 -04:00
Wyatt
025709fe7f set cluster secret to empty in test image 2017-09-21 18:35:24 -04:00
ZenGround0
1d81a1fedc Docker test image add cluster respawn (#111)
* First draft of test dockerfile build

* Test dockerfile, build works, container runs and cluster tests go through

* Removed fifo for output

* renaming dockerfile

* Adding functionality for test 12
Added scripts and entrypoint mods to the testing docker image to allow for random shut down and startup
(both SIGSTOP and SIGINT) of the ipfs-cluster-service.

* test docker image ready for tests 12 and 13

* Added cluster daemon respawn
 to docker image
2017-06-29 12:34:00 +02:00
ZenGround0
6e4b325b35 Docker test image random reaper (#106)
* First draft of test dockerfile build

* Test dockerfile, build works, container runs and cluster tests go through

* Removed fifo for output

* renaming dockerfile

* Adding functionality for test 12
Added scripts and entrypoint mods to the testing docker image to allow for random shut down and startup
(both SIGSTOP and SIGINT) of the ipfs-cluster-service.

* test docker image ready for tests 12 and 13
2017-06-20 12:23:11 +02:00
ZenGround0
0c9f729662 Docker test image build (#103)
* First draft of test dockerfile build

* Test dockerfile, build works, container runs and cluster tests go through

* Removed fifo for output

* renaming dockerfile
2017-06-16 15:07:08 +02:00
Wyatt
07105dbb65 Update docker build, closes #94
Updates dockerfile and entrypoint script to have the same behavior the ipfs-go docker build
moved to in 3477.  This fixes a bug where the cluster entrypoint script does not have
sufficient permissions to access /data/ipfs. The entrypoint also now launches a process with
tini
2017-05-02 17:37:18 -07:00
Hector Sanjuan
ee57cf8a36 Add Dockerfile
License: MIT
Signed-off-by: Hector Sanjuan <hector@protocol.ai>
2017-03-07 17:39:19 +01:00