Skip to content

Commit c92d8d4

Browse files
committed
create the daemon.json if it does not exist
1 parent b58998c commit c92d8d4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,8 @@ local-registry: .env ## creates a local docker registry and configure simcore to
663663
echo configuring host file to redirect $(LOCAL_REGISTRY_HOSTNAME) to 127.0.0.1; \
664664
sudo echo 127.0.0.1 $(LOCAL_REGISTRY_HOSTNAME) | sudo tee -a /etc/hosts;\
665665
echo done)
666+
@$(if $(shell test -f /etc/docker/daemon.json),, \
667+
touch /etc/docker/daemon.json)
666668
@$(if $(shell jq -e '.["insecure-registries"]? | index("http://$(LOCAL_REGISTRY_HOSTNAME):5000")? // empty' /etc/docker/daemon.json),,\
667669
echo configuring docker engine to use insecure local registry...; \
668670
jq 'if .["insecure-registries"] | index("http://$(LOCAL_REGISTRY_HOSTNAME):5000") then . else .["insecure-registries"] += ["http://$(LOCAL_REGISTRY_HOSTNAME):5000"] end' /etc/docker/daemon.json > /tmp/daemon.json &&\

0 commit comments

Comments
 (0)