在 Debian 上安装 xvfb

在 Debian 上安装 xvfb

我正在尝试在 Debian 上的 Docker 容器中安装 xvfb。

Docker 容器的基础镜像是

node:8

安装说明=>如何在 Debian 8 (Jessie) 上安装 xvfb |如何安装.co

所以我有:

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

我收到此错误:

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

有人知道该怎么办吗?我不是 Debian 人。我还没有验证我的 Docker 版本的 Debian 是否正在运行“Jessie”,我会验证一下。

答案1

不知道为什么之前IP无法解析。但神奇的是,这个 Dockerfile 有效:

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"]

相关内容