title: How to access localhost from docker to mobile?
body: <p>I want to view the apps from mobile devices. I have tried to use the ip address of my laptop but i still cant accessed to the apps from mobile devices. I can run the apps locally in my laptop but not in other devices although they are using the same network WIFI. I have tried to add <code>ENV HOST 0.0.0.0</code> which helps to solve connection outside but it still cannot be accessible in my mobile devices. Is there any solution for this ?</p>
  <p>Docker File</p>
  <pre><code>FROM node:16.14.0-alpine3.15 as builder
  ENV HOST 0.0.0.0
  WORKDIR /app
  
  COPY . .
  
  RUN yarn install \
    --prefer-offline \
    --frozen-lockfile \
    --non-interactive \
    --production=false
  
  RUN yarn generate
  
  RUN rm -rf node_modules &amp;amp;&amp;amp; \
    NODE_ENV=production yarn install \
    --prefer-offline \
    --pure-lockfile \
    --non-interactive \
    --production=true
  
  
  # production stage
  FROM nginx:stable-alpine as production-stage
  COPY --from=builder /app/.output/public /usr/share/nginx/html
  EXPOSE 80
  CMD [&quot;nginx&quot;, &quot;-g&quot;, &quot;daemon off;&quot;]
  </code></pre>
  <p>Docker-compose file</p>
  <pre><code>version: '3'
  services:
      backend:
          image: python:3.6
          volumes:
              - ./backend:/backend
          ports:
              - 8000:8000
          command: bash -c &quot;cd ./backend &amp;&amp; pip install -r requirements.txt &amp;&amp; python manage.py migrate &amp;&amp; python manage.p&gt;
      frontend:
          build:
              context: ./frontend
              dockerfile: Dockerfile
          logging:
              driver: &quot;json-file&quot;
              options:
                  max-file: &quot;5&quot;
                  max-size: 50m
          restart: unless-stopped
          ports:
              - 3001:80
  </code></pre>