我已经创建了一个Dockerfile来在一个32位的Ubuntu镜像上安装IBM Rational Rhapsody,在Windows7上使用Docker 18.03.0-ce可以正确构建,但在Linux Mint 19 VM (Ubuntu Bionic repos)上使用Docker 18.09.2会失败。IBM的基于Java的安装程序抛出了一个权限问题,Docker changelogs没有显示任何明显的原因。
失败命令之前的Dockerfile如下:
FROM i386/ubuntu:xenial-20181005 AS installation
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends unzip
COPY Rhapsody812Linux.zip .
RUN unzip -qq Rhapsody812Linux.zip -d Rhapsody812Linux
RUN cd Rhapsody812Linux/disk1/im/installer.linux.gtk.x86 \
&& ./installc input install-rhapsody.xml -acceptLicense我看到的失败是:
org.eclipse.core.runtime.CoreException: Failed to create artifact table of contents at '/var/ibm/InstallationManager/installRegistry/metadata'.
...IBM's library stack trace truncated by me...
Caused by: java.io.IOException: Permission denied
at sun.nio.ch.FileChannelImpl$1.release(FileChannelImpl.java:115)
at sun.nio.ch.FileChannelImpl$SimpleFileLockTable.removeAll(FileChannelImpl.java:1024)
at sun.nio.ch.FileChannelImpl.implCloseChannel(FileChannelImpl.java:112)
at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:108)
...IBM's library stack trace truncated by me...
ERROR: Error restoring Installation Manager state.
ERROR: Failed to create InstallRegistry metadata repository: /var/ibm/InstallationManager/installRegistry/metadata.我发现一个论坛帖子说,如果/tmp无法访问,可能会发生这种情况,看起来是这样的:
drwxr-xr-x 2 root root 4096 Mar 18 20:35 /tmp我交互地运行了一个Ubuntu Xenial镜像,看看我能找到什么,安装程序确实创建了/var/ibm/InstallationManager/installRegistry/metadata,所以我不确定权限问题是从哪里来的。
这些Docker版本之间可能有什么不同,我如何在较新版本中解决此构建失败?
发布于 2019-03-21 03:41:45
在连续多次运行安装程序后,我得到了一个"CRIMC1086E ERROR“,并且发现了一个提到此代码的IBM Knowledge Center entry。建议禁用IBM Installation Manager的存储库锁定,这为我解决了这个问题。
要禁用存储库锁定,请在config.ini中添加cic.repo.locking=false。在我的例子中,我在Dockerfile中添加了以下内容:
# Disable repo lock to avoid potential permissions issue when lock is released
# Experienced with Docker 18.09.2 on a Linux Mint 19 VM
RUN cd Rhapsody812Linux/disk1/im/installer.linux.gtk.x86/configuration \
&& echo 'cic.repo.locking=false' >> config.inihttps://stackoverflow.com/questions/55230329
复制相似问题