Jenkins 처럼 remote build를 하기 위해서 API를 Open 가능함.
sudo vi /lib/systemd/system/docker.service
원래 부분을 주석처리하고 아래처럼 Listen 추가
#ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
ExecStart=/usr/bin/dockerd -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375
데몬 재시작
sudo systemctl daemon-reload
sudo service docker restart
Test
$ curl -XGET http://localhost:2375/images/json | jq