“Unable to locate package build-essential” while Docker build on Debian Jessie

I’m trying to run a Dockerfile that had worked very well until few days ago:

FROM python:2.7
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y build-essential xorg libssl-dev libxrender-dev wget gdebi
RUN wget http://download.gna.org/wkhtmltopdf/0.12/
RUN gdebi --n wkhtmltox-
ADD . /code
RUN pip install -r requirements.txt
RUN ["sh", "-c", "python", "manage.py", "db", "upgrade"]
CMD ["python", "server.py"]

The problem happens during the apt-get install:

  • How to install pgrep/pkill on debian wheezy docker image
  • Docker Debian apt Error Reading from Server
  • Debian httpredir mirror system unreliable/unusable in Docker?
  • Bad Substitution Error Installing NVM within Debian-based Docker image
  • How to install docker-engine 1.13 on debian Jessie
  • DOCKER_OPTS in /etc/default/docker ignored
  • E: Unable to locate package build-essential
    E: Unable to locate package xorg
    E: Unable to locate package gdebi

    I checked the python:2.7 Dockerfile, they build it with a buildpack-deps:jessie image, which is a debian:jessie image.

    I changed nothing since the day it worked well and this Dockerfile run on Amazon Elastic Beanstalk, so it’s not some kind of network problem.
    I tried locally and I got the same errors, so I guess it comes from some changes made in the docker OS images, from the Debian or the buildpack-deps team.

    Here is the source.list (from python:2.7):

    deb http://httpredir.debian.org/debian jessie main
    deb http://httpredir.debian.org/debian jessie-updates main
    deb http://security.debian.org jessie/updates main

    Also, I don’t know how to find in which repo I can find those packages, they say nothing about that on the Debian doc… (https://packages.debian.org/fr/jessie/build-essential)


    After a new full test on local machine, it worked well, So I guess the problem come from Amazon itself…

  • Is it possible to reboot a OS (linux) that is running within a Docker container? (to restart the GPU)
  • Docker instance cannot run images anymore and unable to reclaim free space
  • Using the Spotify Maven Docker plugin, how can I change the file permissions of a resource that I add to a Docker container?
  • Getting java.lang.OutOfMemoryError thrown at me when running Spark inside Docker
  • docker-compose conflicts with Dokerfile entry-point script
  • Static webpage on Nginx Docker Container Missing CSS
  • One Solution collect form web for ““Unable to locate package build-essential” while Docker build on Debian Jessie”

    It seems fixed on Amazon side, there is no more apt-get install failling on Amazon for me, even on load-balanced 🙂

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.