依赖项 – Dockerfile和dpkg命令
发布时间:2020-12-13 20:25:28 所属栏目:百科 来源:网络整理
导读:我正在尝试创建一个Dockerfile来安装VuFind. 这是我的Dockerfile: #Name of container: docker-vufind:3# Pull base imageFROM ubuntu:16.04MAINTAINER xxx "xxx@mail.com"#Install latest patchesRUN apt-get update apt-get install -y apt-get install
我正在尝试创建一个Dockerfile来安装VuFind.
这是我的Dockerfile: #Name of container: docker-vufind:3 # Pull base image FROM ubuntu:16.04 MAINTAINER xxx "xxx@mail.com" #Install latest patches RUN apt-get update && apt-get install -y && apt-get install -y wget #Obtain the package RUN wget http://downloads.sourceforge.net/vufind/vufind_3.1.1.deb?use_mirror=osdn -O vufind_3.1.1.deb #Install it RUN dpkg -i vufind_3.1.1.deb #Install VuFind's dependecies RUN apt-get install -y -f 我在我的Ubuntu的bash上启动了这些命令并且软件工作正常,但似乎我无法使用Dockerfile获得相同的结果,因为dpkg命令因缺少依赖性而失败. The command '/bin/sh -c dpkg -i vufind_3.1.1.deb' returned a non-zero code: 1 在dpkg命令行之前安装dependecies(Apache,jdk,php …)是创建工作Dockerfile的唯一方法还是有更短的方法?
不是最优雅但是:
#continue executing even if command fails RUN dpkg -i vufind_3.1.1.deb || true (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |