example: https://10.0.0.1:8123
Add the extra_hosts
version: '3'
services:
tabby:
build: .
restart: always
depends_on:
- db
ports:
- 9090:9090
extra_hosts:
- "host.docker.internal:10.0.0.1"
volumes:
- ./app-dist:/app-dist
FROM node:12.16-alpine3.11
ENV NODE_ENV=development
#ENV http_proxy 'host.docker.internal:8123'
#ENV https_proxy 'host.docker.internal:8123'
#https://stackoverflow.com/a/52650320
ENV HTTP_PROXY http://host.docker.internal:8123
ENV HTTPS_PROXY http://host.docker.internal:8123
WORKDIR /usr/src/app
RUN apk update && apk upgrade && apk add --no-cache \
bash git openssh python2 curl
RUN npm i -g webpack webpack-cli webpack-dev-server
COPY --chown=root:root package.json /home/node
COPY install.sh /home/node
RUN chmod +x /home/node/install.sh
RUN chmod +w /home/node/package.json
CMD ["/home/node/install.sh"]
...
RUN apk update && apk upgrade && apk add --no-cache \
bash git openssh python2 curl
RUN ping -c 4 host.docker.internal
RUN curl -I https://www.google.com
...