Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21769

Expose hard-coded URLs in OpenShift Dockerfiles as Builder ARGs

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 9.1
    • Component/s: Docker Image

      Description

      An improvement could be written to replace hardcoded URLs in OpenShift Dockerfiles with Dockerfile Builder ARGs/ENVs w/default values (see https://docs.docker.com/engine/reference/builder/#arg) so that Nuxeo Dockerfiles could be used intact by customers in dis-connected environments?

      Exerpt from above Docker engine reference:

      ... Using the example above but a different ENV specification you can create more useful interactions between ARG and ENV instructions:
      
      1 FROM ubuntu
      2 ARG CONT_IMG_VER
      3 ENV CONT_IMG_VER ${CONT_IMG_VER:-v1.0.0}
      4 RUN echo $CONT_IMG_VER
      
      Unlike an ARG instruction, ENV values are always persisted in the built image. Consider a docker build without the --build-arg flag:
      
      $ docker build Dockerfile
      
      Using this Dockerfile example, CONT_IMG_VER is still persisted in the image but its value would be v1.0.0 as it is the default set in line 3 by the ENV instruction.
      The variable expansion technique in this example allows you to pass arguments from the command line and persist them in the final image by leveraging the ENV instruction. Variable expansion is only supported for a limited set of Dockerfile instructions.
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: