当我尝试运行docker镜像时,我收到此错误:
C:\Program Files\Docker Toolbox\docker.exe: Error response from
daemon: invalid header field value "oci runtime error:
container_linux.go:247: starting container process caused
\"exec: \\\"/opt/ibm/docker/docker-server\\\":
stat /opt/ibm/docker/docker-server: no such file or
directory\"\n".**
我在Windows-10上安装了Docker和Docker Tool Box
。我创建了一个小的Spring Web应用程序,我想使用Liberty配置文件运行此应用程序。
我使用docker文件下面构建了docker镜像。
FROM ibmjava:8-jre
RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip \
&& rm -rf /var/lib/apt/lists/*
# Install WebSphere Liberty
ENV LIBERTY_VERSION 16.0.0_04
ARG LIBERTY_URL
ARG DOWNLOAD_OPTIONS=""
RUN LIBERTY_URL=${LIBERTY_URL:-$(wget -q -O - https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/downloads/wlp/index.yml | grep $LIBERTY_VERSION -A 6 | sed -n 's/\s*kernel:\s//p' | tr -d '\r' )} \
&& wget $DOWNLOAD_OPTIONS $LIBERTY_URL -U UA-IBM-WebSphere-Liberty-Docker -O /tmp/wlp.zip \
&& unzip -q /tmp/wlp.zip -d /opt/ibm \
&& rm /tmp/wlp.zip
ENV PATH=/opt/ibm/wlp/bin:$PATH
# Set Path Shortcuts
ENV LOG_DIR=/logs \
WLP_OUTPUT_DIR=/opt/ibm/wlp/output
RUN mkdir /logs \
&& ln -s $WLP_OUTPUT_DIR/defaultServer /output \
&& ln -s /opt/ibm/wlp/usr/servers/defaultServer /config
# Configure WebSphere Liberty
RUN /opt/ibm/wlp/bin/server create \
&& rm -rf $WLP_OUTPUT_DIR/.classCache /output/workarea
#COPY docker-server /opt/ibm/docker/
EXPOSE 9080 9443
CMD ["/opt/ibm/docker/docker-server", "run", "defaultServer"]
答案 0 :(得分:1)
您需要取消评论COPY docker-server /opt/ibm/docker/
行,然后才能按预期工作。