I’m getting the following error on running docker-compose:
[ 5/14] RUN apt-get update && apt-get install libzip-dev -y:
#0 23.97 Err:1 http://deb.debian.org/debian buster InRelease
#0 23.97 Temporary failure resolving 'deb.debian.org'
#0 23.97 Err:2 http://security.debian.org/debian-security buster/updates InRelease
#0 23.97 Temporary failure resolving 'security.debian.org'
#0 33.99 Err:3 http://deb.debian.org/debian buster-updates InRelease
#0 33.99 Temporary failure resolving 'deb.debian.org'
#0 34.01 Reading package lists...
#0 34.02 W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org'
#0 34.02 W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease Temporary failure resolving 'security.debian.org'
#0 34.02 W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease Temporary failure resolving 'deb.debian.org'
#0 34.02 W: Some index files failed to download. They have been ignored, or old ones used instead.
#0 34.19 Reading package lists...
#0 34.21 Building dependency tree...
#0 34.21 Reading state information...
#0 34.22 E: Unable to locate package libzip-dev
------
failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install libzip-dev -y]: exit code: 100
I recently formatted my laptop and installed the latest version of docker but getting the above error. I uninstalled docker and re-installed an older version and the issue was gone.
Steps to replicate (this is the only command I ran):
docker-compose up -d
This is my docker file:
FROM php:7.4.3-apache
ENV TZ="Asia/Kolkata"
RUN date
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
RUN apt-get update && apt-get install libzip-dev -y
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
RUN docker-php-ext-install zip && docker-php-ext-enable zip
RUN docker-php-ext-install pdo pdo_mysql
RUN a2enmod rewrite
COPY ./apache-vhost-config/* /etc/apache2/sites-available
RUN a2ensite mylocalwebsite.conf
CMD ["apachectl", "-D", "FOREGROUND"]
EXPOSE 80
OS: Windows 11 Home Single Language 10.0.22621
App Version: Docker Desktop 4.17.0 (99724)