CORS in Docker Engine REST Api I have activated my Docker Engine V1.41 REST API in docker with this artcile: https://blog.usejournal.com/how-to-enable-docker-remote-api-on-docker-host-7b73bd3278c6
After that in my browser it works fine like http://localhost:port/container/list will show me all lists of my containers in json.
But now, when I try to reach the API with axios in react I get an CORS error: 
So I think I have to setup cors for docker?
I found a bunch of articles about how to enable CORS for a docker image / container but nothing about enabling it for the docker agent / host itself.
Know someone who can answer?
CORS is applied at the application layer, not the infrastructure (docker) layer. So, this has nothing to do with docker. It also has nothing to do with the axios client. Rather, your server needs to allow requests from your client by returning the correct headers via the OPTIONS method.
If you're using nodejs and express, you can add something like this to your service:
app.use((req, res, next) =&gt; {
  res.header(&quot;Access-Control-Allow-Origin&quot;, &quot;*&quot;);
  res.header(&quot;Access-Control-Allow-Headers&quot;, &quot;Origin, X-Requested-With, Content-Type, Accept, Authorization&quot;);
  res.header(&quot;Access-Control-Allow-Methods&quot;, &quot;GET&quot;);

  if (req.method === &quot;OPTIONS&quot;) return res.status(200).json({});

  next();
});

Or, there are plenty of CORS libraries that can help you out.