我在RHEL 7.3上安装了docker。当我尝试&使用java作为基础映像为服务构建映像,它可以成功构建它们。
但是当我尝试&使用node:boron作为基本图像构建我的UI图像,它无法说:
fork/exec docker-containerd-shim: no such file or directory
请帮我解决这个问题。我试过重启docker守护进程&网上提到的其他此类变通办法,但没有运气。
DockerFile
FROM node:boron
# Create app directory
RUN mkdir -p /usr/src/app/sales
WORKDIR /usr/src/app/sales
# Install app dependencies
COPY package.json /usr/src/app/sales
RUN npm install
# Bundle app source
COPY . /usr/src/app/sales
EXPOSE 8182
CMD [ "npm", "start" ]
我们使用fabric.io docker-maven-plugin来构建图像:
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.21.0</version>
<configuration>
<dockerHost>${docker-host}</dockerHost>
<certPath>${docker-cert-path}</certPath>
<images>
<image>
<alias>ui/sl</alias>
<name>ui/sl</name>
<build>
<tags>
<tag>latest</tag>
</tags>
<dockerFileDir>${project.basedir}/build/sl/prod/</dockerFileDir>
</build>
</image>
</images>
<saveFile>${project.build.directory}/ui-sl.tar</saveFile>
</configuration>
<executions>
<execution>
<id>sl docker:build</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>save</goal>
</goals>
</execution>
<execution>
<id>op docker:build</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>save</goal>
</goals>
<configuration>
<images>
<image>
<alias>ui/op</alias>
<name>ui/op</name>
<build>
<tags>
<tag>latest</tag>
</tags>
<dockerFileDir>${project.basedir}/build/op/prod/</dockerFileDir>
</build>
</image>
</images>
<saveFile>${project.build.directory}/uiOp.tar</saveFile>
</configuration>
</execution>
</executions>
</plugin>