title: Use local mirror of Alpine when build images of docker-compose instead legacy repositories
body: <p>Is it possible to use a local repository (mirror) that is used by docker when building a container with docker-compose?</p>
  <p>I have a local mirror, and my interest is that when I build a container with docker-compose build, the apk is downloaded from the local mirror, instead of the Internet</p>
  <p>Example.</p>
  <p>If a local deploy with Dockerfile</p>
  <pre><code>FROM alpine:3.13
  
  # Install packages and remove default server definition
  RUN apk --no-cache add php8=8.0.2-r0 php8-fpm php8-opcache php8-mysqli php8-json \
      php8-openssl php8-curl php8-soap php8-zlib php8-xml php8-phar php8-intl php8-dom php8-xmlreader php8-ctype \
      php8-session php8-simplexml php8-mbstring php8-gd nginx supervisor curl php8-exif php8-zip php8-fileinfo \
      php8-iconv php8-soap tzdata htop mysql-client php8-pecl-imagick php8-pecl-redis php8-tokenizer php8-xmlwriter \
      nano &amp;&amp; rm /etc/nginx/conf.d/default.conf
  </code></pre>
  <p>When deploy container with <code>docker-compose build</code> I like that use my local repository of alpine instead any internet mirrors of Alpine such:</p>
  <pre><code>fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/main/x86_64/APKINDEX.tar.gz
  fetch https://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz
  (1/124) Installing ca-certificates (20191127-r5)
  (2/124) Installing brotli-libs (1.0.9-r3)
  (3/124) Installing nghttp2-libs (1.42.0-r1)
  ...
  </code></pre>