我正在尝试运行DockerFile。
我想做的是运行MobileFirst Image,以便可以在其中运行File.adapter文件。所以首先我想用一个dockerfile来提高应用服务器,但不幸的是我得到了以下输出:
$ docker build -f ./doc .
Sending build context to Docker daemon 4.608kB
Step 1/23 : FROM ubuntu:14.04
---> 971bb384a50a
Step 2/23 : MAINTAINER Gabriel Mancini <gmancini@br.ibm.com> (@new_biel)
---> Using cache
---> 2669f78208fd
Step 3/23 : RUN apt-get update && apt-get install -y apt-transport-https build-
ssential git-core wget unzip supervisor
---> Running in c846bc39a7a3
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://security.ubuntu.com trusty-security Release.gpg
Ign http://security.ubuntu.com trusty-security Release
Err http://security.ubuntu.com trusty-security/universe Sources
403 Forbidden [IP: 91.189.88.149 80]
....
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/trusty-security/mult
verse/binary-amd64/Packages 403 Forbidden [IP: 91.189.88.149 80]
E: Some index files failed to download. They have been ignored, or old ones use
instead.
The command '/bin/sh -c apt-get update && apt-get install -y apt-transport-http
build-essential git-core wget unzip supervisor' returned a non-zero code: 100
Docker文件:
FROM ubuntu:14.04
MAINTAINER Gabriel Mancini <gmancini@br.ibm.com> (@new_biel)
# Install basics
RUN apt-get update && \
apt-get install -y \
apt-transport-https \
build-essential \
git-core \
wget \
unzip \
supervisor
# Install Java.
# add webupd8 repository
RUN \
echo "===> add webupd8 repository..." && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update && \
\
\
echo "===> install Java" && \
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --force-yes oracle-java8-installer oracle-java8-set-default \
maven && \
\
echo "===> clean up..." && \
rm -rf /var/cache/oracle-jdk7-installer && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-7-oracle
# Install NodeJS
ENV NODE_VERSION 0.10.29
RUN \
wget -q -O - "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \
| tar xzf - --strip-components=1 --exclude="README.md" --exclude="LICENSE" \
--exclude="ChangeLog" -C "/usr/local"
# Install node-gyp
RUN npm install -g node-gyp
# Install nodevisor
RUN git clone https://github.com/TAKEALOT/nodervisor.git /opt/nodervisor \
&& cd /opt/nodervisor \
&& npm install
# Install Mobile First Platform
ENV MFP_VERSION 7.0.0
RUN MFP_URL="https://public.dhe.ibm.com/ibmdl/export/pub/software/products/en/MobileFirstPlatform/mobilefirst_cli_installer_$MFP_VERSION.zip" \
&& wget -q $MFP_URL -U UA-IBM-WebSphere-Liberty-Docker -O "/tmp/mobilefirst_cli_installer_$MFP_VERSION.zip" \
&& unzip -q "/tmp/mobilefirst_cli_installer_$MFP_VERSION.zip" -d /tmp/mfp \
&& unzip -q "/tmp/mfp/mobilefirst-cli-installer-$MFP_VERSION/resources/mobilefirst-cli-$MFP_VERSION-install.zip" -d /opt/ibm \
&& rm -rf /tmp/mfp* \
&& cd /opt/ibm/mobilefirst-cli \
&& npm install
ENV PATH /opt/ibm/mobilefirst-cli:$PATH
ENV PATH node_modules/.bin:$PATH
ENV PATH node_modules/bin:$PATH
# Configure mfp
COPY mfp /opt/ibm/mobilefirst-cli/mfp
RUN chmod 755 /opt/ibm/mobilefirst-cli/mfp
# Configure supervisor
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN chmod 755 /etc/supervisor/conf.d/supervisord.conf
# Configure WebSphere Liberty
RUN mfp create-server
EXPOSE 10080 3000
#WORKDIR /workspace
VOLUME /workspace
CMD ["/usr/bin/supervisord"]
#CMD ["mfp", "-d", "start"]
您能指导我怎么回事吗? 我在dockerToolbox的Windows 7中运行它。
答案 0 :(得分:1)
Ubuntu 14.4现在已经很老了,如果可能的话,考虑考虑更新的版本。我不知道它的更新现在是否正在发布。
如果必须使用它,则可能不再能够为其更新。如果没有更新,则应在archive.ubunut.com上提供所有软件包的最新版本(发布最新更新时)。在/etc/apt/sources.list
的某个地方可以方便地替换它,该地方被配置为使用归档文件并适用于Ubuntu14。