dockerubuntudocker-composeapt-get

Docker Compose: Apt-utils installation problem


I am trying to build a new image in Docker Compose but the following problem occurs

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/a/apt/apt-utils_2.4.7_amd64.deb  404  Not Found [IP: ]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The command '/bin/sh -c apt-get install -y apt-utils' returned a non-zero code: 100
ERROR: Service 'nginx-service' failed to build : Build failed

In my Dockerfile I'm running: RUN apt-get install -y apt-utils and with --fix-missing.

None of the related questions or other solutions helped me and I've been stuck for quite a while. What am I missing?

Thanks!

EDIT: The whole Dockerfile

FROM ubuntu:latest
RUN apt-get update 
RUN apt-get upgrade -y
RUN apt-get install -y nginx 
RUN apt-get clean 
RUN apt-get install -y curl
RUN apt-get install -y unzip
RUN apt-get install -y wget
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get install -y php php-xml php-curl php-fpm php-mysql 
RUN apt-get install -y apt-utils --fix-missing
RUN apt-get install -y php-zip --fix-missing
RUN apt-get install -y php-gd --fix-missing
RUN apt-get install -y mysql-server
RUN curl -sS https://getcomposer.org/installer -o composer-setup.php
RUN php composer-setup.php --install-dir=/usr/local/bin --filename=composer
RUN apt-get install -y nano
RUN apt-get install -y mc
RUN apt-get install -y systemctl
RUN systemctl start nginx.service

Solution

  • Building the image like this: docker-compose build --no-cache worked for me