1

I am trying to build my project from a dockerfile. It suddenly stopped working. I am trying to use an alpine docker image to put my project and live in it.

FROM renokico/laravel-base:octane-latest-php8.0-alpine


COPY ./extra_files/JSON.php ./vendor/siftscience/sift-php/lib/Services_JSON-1.0.3/
COPY ./extra_files/DBSCAN.php  ./vendor/php-ai/php-ml/src/Phpml/Clustering/
COPY ./extra_files/File.php  ./vendor/kount/kount-ris-php-sdk/src/Kount/SimpleLogger/
COPY . /var/www/html

RUN apk add --update --no-cache libpq
RUN apk add --no-cache --virtual .build-deps
RUN apk add $PHPIZE_DEPS
RUN apk add postgresql-dev
RUN apk add  g++ && \
docker-php-ext-install pdo_pgsql pgsql && \
apk del .build-deps

What could be causing this error below ?

fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.12/main: temporary error (try again 
later)
WARNING: Ignoring APKINDEX.2c4ac24e.tar.gz: No such file or directory
 ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.12/community: temporary error (try 
again later)
WARNING: Ignoring APKINDEX.40a3604f.tar.gz: No such file or directory
ERROR: unsatisfiable constraints:
dpkg (missing):
required by: world[dpkg]
dpkg-dev (missing):
required by: world[dpkg-dev]
re2c (missing):
required by: world[re2c]
The command '/bin/sh -c apk add $PHPIZE_DEPS' returned a non-zero code: 3
deep freeze
  • 51
  • 1
  • 6
  • There is a similar resolved issue: https://stackoverflow.com/questions/53710206/docker-cant-build-because-of-alpine-error – BaDos Nov 15 '22 at 05:37
  • 2
    Does this answer your question? [docker can't build because of alpine error](https://stackoverflow.com/questions/53710206/docker-cant-build-because-of-alpine-error) – Harrison Nov 16 '22 at 14:57
  • yes it was the answer – deep freeze Nov 19 '22 at 11:04

1 Answers1

0

I also came here looking for the answer.

For me it's not the accepted answer of the linked link worked, but instead this:

sudo systemctl restart docker docker.service

If you're using Docker Desktop you could simply restart from there as well.

Gayan
  • 3,614
  • 1
  • 27
  • 34