Hi all,
I am getting very strange issue with:
# cat /etc/os-release
NAME=CoreOS
ID=coreos
VERSION=766.3.0
VERSION_ID=766.3.0
BUILD_ID=
PRETTY_NAME="CoreOS 766.3.0"
ANSI_COLOR="1;32"
Here's my very simple Dockerfile (installing Java and timezone update):
# cat Dockerfile
FROM centos:6
RUN yum install -y unzip wget
ENV oracle_jdk_download_dir '/java64'
ENV oracle_jdk_package 'jdk-7u51-linux-x64.tar.gz'
ENV oracle_jdk_package_subdir '7u51-b13'
ENV oracle_jdk_unpacked_dirname 'jdk1.7.0_51'
RUN cd ${oracle_jdk_download_dir}; tar -xzf ${oracle_jdk_package}; rm -f current; ln -s ${oracle_jdk_unpacked_dirname} current; chown -R root:root ${oracle_jdk_download_dir} && chmod -R a+rwX ${oracle_jdk_download_dir}
ENV TZUPDATER_VERSION_UNDERSCORES 2_0_3
ENV TZUPDATER_VERSION_DOTS 2.0.3
ENV TZUPDATER_POSTFIX 2015b
ENV JAVA_HOME ${oracle_jdk_download_dir}/current
unzip tzupdater-${TZUPDATER_VERSION_UNDERSCORES}-${TZUPDATER_POSTFIX}.zip && mv tzupdater-${TZUPDATER_VERSION_DOTS}-${TZUPDATER_POSTFIX}/tzupdater.jar /
RUN cd ${JAVA_HOME}/jre/bin/; ${JAVA_HOME}/bin/java -jar /tzupdater.jar -u -v && rm -rf /tzupdater-${TZUPDATER_VERSION_UNDERSCORES}-${TZUPDATER_POSTFIX}.zip tzupdater-${TZUPDATER_VERSION_UNDERSCORES}-${TZUPDATER_POSTFIX} /tzupdater.jar || /bin/true
RUN false
The problem is that I can successfully build this Dockefile on any other machine with Centos6 (like host OS), but can not build the same Dockerfile on CoreOS, it fails with following:
Step 14 : RUN cd ${JAVA_HOME}/jre/bin/; ${JAVA_HOME}/bin/java -jar /tzupdater.jar -u -v && rm -rf /tzupdater-${TZUPDATER_VERSION_UNDERSCORES}-${TZUPDATER_POSTFIX}.zip tzupdater-${TZUPDATER_VERSION_UNDERSCORES}-${TZUPDATER_POSTFIX} /tzupdater.jar || /bin/true
---> Running in e043a0cca40a
java.home: /usr1/java64/jdk1.7.0_51/jre
java.vendor: Oracle Corporation
java.version: 1.7.0_51
JRE tzdata version: tzdata2013h
tzupdater tool would update with tzdata version: tzdata2015b
Extracting files... done.
Renaming /usr1/java64/jdk1.7.0_51/jre/lib/zi to /usr1/java64/jdk1.7.0_51/jre/lib/zi.tzdata2013h
failed.
Cant rename {0} to {1}.
Exception in thread "main" com.sun.tools.tzupdater.TzRuntimeException: com.sun.tools.tzupdater.TzRuntimeException: Cant rename {0} to {1}.
at com.sun.tools.tzupdater.TimezoneUpdater.main(TimezoneUpdater.java:799)
Caused by: com.sun.tools.tzupdater.TzRuntimeException: Cant rename {0} to {1}.
at com.sun.tools.tzupdater.TimezoneUpdater.update(TimezoneUpdater.java:332)
at com.sun.tools.tzupdater.TimezoneUpdater.run(TimezoneUpdater.java:272)
at com.sun.tools.tzupdater.TimezoneUpdater.main(TimezoneUpdater.java:780)
---> 23fd98ab71fe
Removing intermediate container e043a0cca40a
Step 15 : RUN false
---> Running in f8773924afbc
The command '/bin/sh -c false' returned a non-zero code: 1
If I run base images like docker run --rm -it centos:6 bash and then start putting lines from the Dockerfile above one by one - it all goes fine.
Could you please point me into right direction?
Regards,
Sergey