我正在尝试创建一个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 命令行之前安装依赖项(如 Apache、jdk、php...)是创建有效的 Dockerfile 的唯一方法吗?还是有更简短的方法?