CORS in Docker Engine REST Api
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.