Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-4388

improve find command in container build script

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 2.6.16.2
    • None
    • None
    • None

    Description

      Marwan Shaher
      1:25 PM
      the find command can be very finicky. With 2.6.16.2, /opt/grouper/slashRoot isn't getting excluded in /opt/container_files/docker-build-bin/containerDockerfileInstallPermissions.sh by the find so the following logs show up when the container starts:
      daemon_1 | grouperContainer; INFO: (librarySetupFiles.sh-setupFiles_loggingPrefix) cp /opt/grouper/grouperWebapp/WEB-INF/classes/log4j2.xml /opt/tomee/conf/log4j2.xml, result: 0
      daemon_1 | find: paths must precede expression: /opt/grouper/slashRoot/opt
      daemon_1 | Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
      Again, it's find being finicky , and it's not excluding the directory like it should. But, it's an easy fix. Instead of using -not -path <path> , use -path <path> -prune -o instead. Also, not an issue here but I would recommend it, is to eliminate the trailing / when listing directories in the find command

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: