Description of problem: Docker build failed with "Unknown flag: chown" from dockerfile which created by s2i build Version-Release number of selected component (if applicable): s2i v1.1.11-14-g05cadb9 How reproducible: always Steps to Reproduce: 1. Building the latest binary from source-to-image master manually 2.Produce an docker file from s2i build $s2i build //github.com/openshift/nodejs-ex openshift/nodejs-010-centos7 --as-dockerfile=./Dockerfile 3.Create image using the dockerfile $docker build -t nodejs-sample-app . 4. Check the log $ docker build -t nodejs-sample-app . Sending build context to Docker daemon 130.6 kB Step 1 : FROM openshift/nodejs-010-centos7 Trying to pull repository registry.access.redhat.com/openshift/nodejs-010-centos7 ... Trying to pull repository xxxxreg-aws.xxx.com:443/openshift/nodejs-010-centos7 ... Trying to pull repository brew-pulp-xxx:8888/openshift/nodejs-010-centos7 ... Trying to pull repository docker.io/openshift/nodejs-010-centos7 ... sha256:bd971b467b08b8dbbbfee26bad80dcaa0110b184e0a8dd6c1b0460a6d6f5d332: Pulling from docker.io/openshift/nodejs-010-centos7 8d30e94188e7: Pull complete 9e0d025d6982: Pull complete e7c36c73b545: Pull complete 279efb65a614: Pull complete ba5278dc9861: Pull complete 603b1199503e: Pull complete eb391703fc76: Pull complete 690db3aefd04: Pull complete adbe087ab826: Pull complete Digest: sha256:bd971b467b08b8dbbbfee26bad80dcaa0110b184e0a8dd6c1b0460a6d6f5d332 Status: Downloaded newer image for docker.io/openshift/nodejs-010-centos7:latest ---> 6a270f856ef9 Step 2 : USER 1001 ---> Running in 34cb1523fb6e ---> b3f90526ad0a Removing intermediate container 34cb1523fb6e Step 3 : LABEL "io.openshift.s2i.build.commit.message" "Merge pull request #187 from Gl4di4torRr/master" "io.openshift.s2i.build.source-location" "https://github.com/openshift/nodejs-ex" "io.openshift.s2i.build.image" "openshift/nodejs-010-centos7" "io.openshift.s2i.build.commit.author" "Ben Parees <bparees.github.com>" "io.openshift.s2i.build.commit.date" "Tue Jun 26 08:44:42 2018 -0400" "io.openshift.s2i.build.commit.id" "24e7e684ac4a854f01d46eb90ccb90265044f4d3" "io.openshift.s2i.build.commit.ref" "master" ---> Running in bb25670b1e26 ---> 6b0ca32e4951 Removing intermediate container bb25670b1e26 Step 4 : COPY --chown=1001:0 upload/src /tmp/src Unknown flag: chown Actual results: failed with error "Unknown flag: chown" Expected results: should build succesfully Additional info: according pr is merged:https://github.com/moby/moby/pull/34263, It looks like support chown command. FYI, image should not pull image from internal registry like brew.pulp registry.
yes, Updated newer docker Version: 18.06.0-ce-rc1 and remove docker daemon's configuration, it works, thanks here is log: [root@qe-wewang-rhel-1 amd64]# docker build -t nodejs-sample-app . Sending build context to Docker daemon 12.33MB Step 1/6 : FROM openshift/nodejs-010-centos7 latest: Pulling from openshift/nodejs-010-centos7 8d30e94188e7: Pull complete 9e0d025d6982: Pull complete e7c36c73b545: Pull complete 279efb65a614: Pull complete ba5278dc9861: Pull complete 603b1199503e: Pull complete eb391703fc76: Pull complete 690db3aefd04: Pull complete adbe087ab826: Pull complete Digest: sha256:bd971b467b08b8dbbbfee26bad80dcaa0110b184e0a8dd6c1b0460a6d6f5d332 Status: Downloaded newer image for openshift/nodejs-010-centos7:latest ---> 6a270f856ef9 Step 2/6 : USER 1001 ---> Running in 754f4709236e Removing intermediate container 754f4709236e ---> c2764b81646a Step 3/6 : LABEL "io.openshift.s2i.build.source-location"="https://github.com/openshift/nodejs-ex" "io.openshift.s2i.build.image"="openshift/nodejs-010-centos7" "io.openshift.s2i.build.commit.author"="Ben Parees <bparees.github.com>" "io.openshift.s2i.build.commit.date"="Tue Jun 26 08:44:42 2018 -0400" "io.openshift.s2i.build.commit.id"="24e7e684ac4a854f01d46eb90ccb90265044f4d3" "io.openshift.s2i.build.commit.ref"="master" "io.openshift.s2i.build.commit.message"="Merge pull request #187 from Gl4di4torRr/master" ---> Running in d642dc0c1872 Removing intermediate container d642dc0c1872 ---> f04367bed3b7 Step 4/6 : COPY --chown=1001:0 upload/src /tmp/src ---> 056fbeb62d29 Step 5/6 : RUN /usr/libexec/s2i/assemble ---> Running in 35c10cf45103 ---> Installing application source ... ---> Building your Node application from source
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:2652