Answer '29' to apt-get install prompt for xorg Answer '29' to apt-get install prompt for xorg shell shell

Answer '29' to apt-get install prompt for xorg


There are quite a few issues I see with the Dockerfile provided.

  1. Defining a volume inside the Dockerfile provides little to no value. It's much better to define this in your docker-compose.yml or as part of your run command. I've got a blog post going through the issues with this.

  2. Splitting up the apt-get update from the later apt-get install commands can result in situations where the apt-get install will fail. There's a section in the best practices about this.

  3. For your error message, I'd run apt-get in the noninteractive mode. You can also preconfigure debconf if you need a non-default value set during install.

  4. Splitting each apt-get into a separate RUN command is creating lots of excessive layers, these should be merged where possible. This is also described in the best practices documentation.

Here's a sample of an install command that works for me taking the above into account:

FROM ubuntu:16.04RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive apt-get install -y \      build-essential \      xorg \      libssl-dev \      libxrender-dev \      wget \      gdebi \      libxrender1 \      xfonts-utils \      xfonts-base \      xfonts-75dpi