Exposing Docker API in Alpine
FYI: DO NOT EXPOSE PRODUCTION DOCKER API TO INTERNET
you have been warned, exposing production docker api to internet may cause security leak, follow this tutorial with your own discretion.
How to expose docker api in alpine linux:
nano /etc/conf.d/docker
modify DOCKER_OPTS to :
DOCKER_OPTS="-H tcp://0.0.0.0:8888 -H unix:///var/run/docker.sock"
restart docker by
/etc/init.d/docker restart
test the api by doing :
curl http://localhost:8888/images/json
you’ll get [] as a result or whatever images you have in your machine