Docker build freezes installing packages from apt

I have a dockerfile which needs installing some 720mb worth of packages from apt.

run DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip python-dev\
    supervisor mercurial subversion buildbot buildbot-slave subversion doxygen\
    cmake cloc build-essential valgrind cccc scons g++ cppcheck qt4-dev-tools\
    wget lcov graphviz

The build runs up to almost half of the packages requested, then it just hangs idle there.

  • Webpack, asp.net core, docker: building webpack with dotnet debug or release build
  • Docker Debian apt Error Reading from Server
  • Setting name for a docker image
  • Golang Mac OSX build for Docker machine
  • installing `lightdm` in Dockerfile raises interactive keyboard layout menu
  • How to install Docker from the Source code?
  • Is there a way to know for sure if the process has halted or if it’s just idle waiting for the network or something along those lines?

  • AWS EB deployment - where is my app?
  • How to limit egress traffic of a docker network with `tc tbf`
  • How to run a docker containter linked to a previously created volume
  • Is there a gui for writing dockerfiles?
  • Unable to access local network IP from docker container
  • External properties file using Spring Boot and Docker
  • 2 Solutions collect form web for “Docker build freezes installing packages from apt”

    You can check which process is running using e.g. ps faux | less. Scroll down to find the lxc-start process corresponding to your container, and see what is running under it (the f flag triggers a forest display which should show in a pretty obvious way which processes belong to the container).

    Then, you can use strace -fp <pid> to attach to the last running process in that container and see what it is doing.

    Last but not least, you can try to break down the command in 2 or 3 phases. In the (unlikely) case where the problem would come from a package prompting you for input (which shouldn’t happen since you specified the noninteractive front-end, but who knows) that will help to single it out.

    Most of the time it’s a network issue. Do you use a proxy on your host?

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