“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 docker-engine 1.13 on debian Jessie
  • Docker image running as unknown user ID can delete root files
  • If a service is started during docker build, should it be running at runtime?
  • dotnet core SDK/Runtime on debian in dockers
  • W: Size of file /var/lib/apt/lists/http.debian.net_debian_dists_jessie_main_binary-amd64_Packages.gz is not what the server reported 9101219 9117278
  • Docker apt-get fails inside minikube
  • 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…

  • how to correctly remove previous commits of an image in order to build it from the very scratch
  • Bluemix: local Docker daemon is not reachable to authenticate it
  • Using curl with success while running containers
  • stop a database container in docker automatically
  • How to create a DB for MongoDB container on start up?
  • Spotify docker-gc: prevent auto stop after first run
  • 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.