Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-25803

The -n option to docker-image-tool.sh causes other options to be ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • Kubernetes, Spark Core
    • None
      • OS X 10.14
      • iTerm2
      • bash3
      • Docker 2.0.0.0-beta1-mac75 (27117)

      (NB: I don't believe the above has a bearing; I imagine this issue is present also on linux and can confirm if needed.)

    Description

      To reproduce:-

      1. Build spark
      $ ./build/mvn -Pkubernetes -DskipTests clean package

      2. Create a Dockerfile (a simple one, just for demonstration)
      $ cat > hello-world.dockerfile <<EOF
      > FROM hello-world
      > EOF

      3. Build container images with our Dockerfile
      $ ./bin/docker-image-tool.sh -R hello-world.dockerfile -r docker.io/myrepo -t myversion build

      The result is that the -R option is honoured and the hello-world image is built for spark-r, as expected.

      4. Build container images with our Dockerfile and the -n option
      $ ./bin/docker-image-tool.sh -n -R hello-world.dockerfile -r docker.io/myrepo -t myversion build

      The result is that the -R option is ignored and the default container image for R is built

      docker-image-tool.sh, uses getopts in which a colon, ':', signifies that an option takes an argument.  Since -n does not take an argument it should not have a colon.

      Attachments

        Activity

          People

            slarkin Steve Larkin
            slarkin Steve Larkin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: