2

I am trying to install xvfb on Debian in a Docker container.

The base image for the Docker container is

node:8

install instructions => How to install xvfb on Debian 8 (Jessie) | howtoinstall.co

So I have:

RUN sudo apt-get -y update
RUN sudo apt-get install -y xvfb --fix-missing

I get this error:

E: Failed to fetch http://deb.debian.org/debian/pool/main/x/xorg-server/xvfb_1.16.4-1_amd64.deb  404  Not Found [IP: 151.101.0.204 80]

The command '/bin/sh -c apt-get install -y xvfb --fix-missing' returned a non-zero code: 100

anyone know what to do? I am not a Debian fellow. I haven't verified that my Docker version of Debian is running "Jessie", I will do that.

  • 1
    Could you share your Dockerfile? I've just run a quick test and it seems to work fine for me (although you don't need sudo in your Dockerfile) ... pastebin.com/UDPzDpUU – Chris Davidson Sep 7 '17 at 21:23
  • I got it to work by doing something with apt-utils, IIRC, I will add an answer – Alexander Mills Sep 7 '17 at 22:08
2

Not sure why the IP was not resolving before. But magically this Dockerfile works:

FROM node:8

RUN apt-get update && \
      apt-get -y install sudo

RUN sudo apt-get -y  --fix-missing update
RUN sudo apt-get -y  --fix-missing upgrade
RUN sudo apt-get -y --no-install-recommends install apt-utils
RUN sudo apt-get install -y sqlite3 libsqlite3-dev
RUN sudo apt-get install -y telnet
RUN sudo apt-get install -y netcat
RUN sudo apt-get install -y mongodb
RUN apt-get install -y chromium
RUN apt-get install --fix-missing -y xvfb  


RUN echo " => User home in test container is $HOME"

RUN mkdir -p /tmp/test-deps
RUN mkdir -p /usr/local/cdt-tests
WORKDIR /usr/local/cdt-tests

ENV NODE_ENV test
# => mongodb username/password are empty for now
ENV OPENSHIFT_MONGODB_DB_USERNAME ""
ENV OPENSHIFT_MONGODB_DB_PASSWORD ""
ENV OPENSHIFT_MONGODB_DB_HOST "cdt-mongo.cdt-net"
ENV OPENSHIFT_MONGODB_DB_PORT 27017
ENV PROJECT_ROOT ${PROJECT_ROOT}
ENV SUMAN_POSTINSTALL_IS_DAEMON no

RUN npm config --global set color false
RUN npm config --global set progress=false
RUN npm config --global set loglevel=warn

# npm stuff
COPY package.json .
RUN npm install --no-optional --log-level=warn --silent > /dev/null
RUN npm install -g bunyan --log-level=warn --silent > /dev/null
RUN npm install -g protractor --log-level=warn --silent > /dev/null


# bower stuff
COPY bower.json .
COPY .bowerrc .
RUN npm install bower  > /dev/null 2>&1
RUN mkdir -p ./public/lib
RUN ./node_modules/.bin/bower install --config.interactive=false --allow-root  > /dev/null 2>&1

COPY . .

RUN cp -r cdt-logger node_modules/cdt-logger

ENTRYPOINT ["/bin/bash", "/usr/local/cdt-tests/@run-tests.sh"]
  • happen to stumble upon this - this is a very helpful example of how to effecitvely get apt-get to work on a docker instance. – Nicholas DiPiazza Mar 1 '18 at 3:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.