7

I am behind proxy and I have set the proxy config for Docker and able to dowload docker images but I am unable to Build from my docker file as it always fails at fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz

I have tried other ways like changing the repo but still am unable to build

FROM python:3.6-alpine

ENV PYTHONUNBUFFERED 1

#RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories

RUN apk update \
  # psycopg2 dependencies
  && apk add --virtual build-deps gcc python3-dev musl-dev \
  && apk add postgresql-dev \
  # Pillow dependencies
  && apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev \
  # CFFI dependencies
  && apk add libffi-dev py-cffi \
  # Translations dependencies
  && apk add gettext \
  # https://docs.djangoproject.com/en/dev/ref/django-admin/#dbshell
  && apk add postgresql-client

# Requirements are installed here to ensure they will be cached.
COPY ./requirements /requirements
RUN pip install -r /requirements/local.txt

COPY ./compose/production/django/entrypoint /entrypoint
RUN sed -i 's/\r//' /entrypoint
RUN chmod +x /entrypoint

COPY ./compose/local/django/start /start
RUN sed -i 's/\r//' /start
RUN chmod +x /start

COPY ./compose/local/django/celery/worker/start /start-celeryworker
RUN sed -i 's/\r//' /start-celeryworker
RUN chmod +x /start-celeryworker

COPY ./compose/local/django/celery/beat/start /start-celerybeat
RUN sed -i 's/\r//' /start-celerybeat
RUN chmod +x /start-celerybeat

COPY ./compose/local/django/celery/flower/start /start-flower
RUN sed -i 's/\r//' /start-flower
RUN chmod +x /start-flower

WORKDIR /app

ENTRYPOINT ["/entrypoint"]
venkateswar
  • 145
  • 1
  • 8
  • Found a solution to this? – InsOp Dec 15 '20 at 14:31
  • similar issue with php:8-fpm-alpine. I tried to change /etc/docker/daemon.json (from https://mlohr.com/docker-mtu/) and add mtu: 1454 (and more 1908), then restart docker daemon, but not effect – bcag2 Oct 20 '22 at 14:27
  • If I run same command on other computer at my office with hight speed internet connexion (FO), it works – bcag2 Oct 20 '22 at 15:12
  • Look at similar issue and solution : https://stackoverflow.com/a/42332682/6614155 – bcag2 Oct 21 '22 at 09:23

0 Answers0