Exposing Docker API in Alpine

Fredy Yudiawan
1 min readJul 17, 2020

--

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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Fredy Yudiawan
Fredy Yudiawan

Written by Fredy Yudiawan

Nature Photographer by day, software developer by night. https://www.linkedin.com/in/ftansari/

No responses yet

Write a response