Replacement of Root Images



  • Root Docker Images must not be overwritten.

    I'm happy to change my Dockerfile to use openshift/[name] instead of the original name, but if i request java I expect to get the docker.io/java image.


  • APPUiO Staff

    @maennchen What do you get instead? There's no image named java on OpenShift or in Red Hat's registry. Does it work if you use the full image name, which would be library/java in this case?



  • requesting java automatically pulls library/java

    but i'd like https://hub.docker.com/_/java/


  • APPUiO Staff

    @munzli Yes, Docker does this. java is an alias for library/java on DockerHub. OpenShift just shows the full name. You can verify this by pulling the image locally:

    $ docker pull java
    Using default tag: latest
    Trying to pull repository docker.io/library/java ... latest: Pulling from library/java


  • pulling locally gives me the correct image from docker hub. if i compare the hashes the one received through openshift is different. and dockerhub is based off of ubuntu, the openshift image is redhat.
    pretty new to docker so maybe i'm not quite understanding something here...


  • APPUiO Staff

    @munzli You are probably looking at the wrong thing. The java image is based on Debian, not on Ubuntu. I just built an app on OpenShift based on a Dockerfile with FROM java and got the very image you are looking for:

    $ oc logs -f openshift3-docker-hello-1-build
    I0422 12:29:17.797761       1 source.go:189] Cloning source from https://github.com/appuio/openshift3-docker-hello
    Step 0 : FROM library/java@sha256:1088fcd2bf5c98bdc53f8e22e73956eb02f835c81b33d50caa6f8a45849aebc8
    Trying to pull repository registry.access.redhat.com/library/java ... failed
    Trying to pull repository docker.io/library/java ... Pulling from library/java
    Already exists
    ...
    Already exists
    Digest: sha256:1088fcd2bf5c98bdc53f8e22e73956eb02f835c81b33d50caa6f8a45849aebc8
    

    Which is based on Debian:

    $ oc exec openshift3-docker-hello-1-qeam7 cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
    NAME="Debian GNU/Linux"
    VERSION_ID="8"
    VERSION="8 (jessie)"
    ID=debian
    HOME_URL="http://www.debian.org/"
    SUPPORT_URL="http://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    

    Please note that only Docker digest hashes are comparable, like the one that is printed after pulling an image. All other Docker hashes, like image IDs, are not and vary from system to system.



  • This seems to be our fault. We checked /proc/version and found Red Hat 4.8.5-4. However it seems to differ over those two commands.

    $ oc exec ao-interact-java-26-coshm cat /etc/os-release
    PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
    NAME="Debian GNU/Linux"
    VERSION_ID="8"
    VERSION="8 (jessie)"
    ID=debian
    HOME_URL="http://www.debian.org/"
    SUPPORT_URL="http://www.debian.org/support"
    BUG_REPORT_URL="https://bugs.debian.org/"
    
    $ oc exec ao-interact-java-26-coshm cat /proc/version
    Linux version 3.10.0-327.10.1.el7.x86_64 (mockbuild@x86-021.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Sat Jan 23 04:54:55 EST 2016
    

  • APPUiO Staff

    Ah, yes. ˋproc/versionˋ contains the kernel version. But Docker containers don't contain a kernel, they all run on the host kernel. So you'll always see the Red Hat kernel of the host there.


Log in to reply
 

Looks like your connection to APPUiO Discussion and Help Forum was lost, please wait while we try to reconnect.