diff --git a/Makefile b/Makefile index 3936460b..a67f4342 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,25 @@ .PHONY: build-keria -build-keria: - @docker buildx build --platform=linux/amd64 --no-cache -f images/keria.dockerfile --tag weboftrust/keria:0.2.0-rc1 . + +VERSION=0.2.0-rc1 + +define DOCKER_WARNING +In order to use the multi-platform build enable the containerd image store +The containerd image store is not enabled by default. +To enable the feature for Docker Desktop: + Navigate to Settings in Docker Desktop. + In the General tab, check Use containerd for pulling and storing images. + Select Apply and Restart." +endef + +build-keria: .warn + @docker build --platform=linux/amd64,linux/arm64 --no-cache -f images/keria.dockerfile -t weboftrust/keria:$(VERSION) . publish-keria: - @docker push weboftrust/keria --all-tags \ No newline at end of file + @docker push weboftrust/keria:$(VERSION) + +.warn: + @echo -e ${RED}"$$DOCKER_WARNING"${NO_COLOUR} + +RED="\033[0;31m" +NO_COLOUR="\033[0m" +export DOCKER_WARNING diff --git a/README.md b/README.md index 482f9c4b..d06afe5a 100644 --- a/README.md +++ b/README.md @@ -84,3 +84,18 @@ You can see a [working example here](https://github.com/WebOfTrust/signify-ts/bl ```bash pytest tests/ ``` + +## Publishing containers + +Enable the containerd image store + +The containerd image store isn't enabled by default. To enable the feature for Docker Desktop: + +Navigate to Settings in Docker Desktop. +In the General tab, check Use containerd for pulling and storing images. +Select Apply & Restart. + +```shell +make build-keri +make publish-keri +``` \ No newline at end of file diff --git a/src/keria/app/agenting.py b/src/keria/app/agenting.py index 7876073b..9ecdc1cf 100644 --- a/src/keria/app/agenting.py +++ b/src/keria/app/agenting.py @@ -890,8 +890,8 @@ def on_post(self, req, rep): caid = icp.pre if self.agency.get(caid=caid) is not None: - raise falcon.HTTPBadRequest(title="agent already exists", - description=f"agent for controller {caid} already exists") + raise falcon.HTTPConflict(title="agent already exists", + description=f"agent for controller {caid} already exists") agent = self.agency.create(caid=caid) diff --git a/tests/app/test_agenting.py b/tests/app/test_agenting.py index 2a31c2c5..c6ef6593 100644 --- a/tests/app/test_agenting.py +++ b/tests/app/test_agenting.py @@ -224,7 +224,7 @@ def test_boot_ends(helpers): assert rep.status_code == 202 rep = client.simulate_post("/boot", body=json.dumps(body).encode("utf-8")) - assert rep.status_code == 400 + assert rep.status_code == 409 assert rep.json == { 'title': 'agent already exists', 'description': 'agent for controller EK35JRNdfVkO4JwhXaSTdV4qzB_ibk_tGJmSVcY4pZqx already exists'