Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-2065

Using Dockerfile.jvm generated from code.quarkus.redhat.com changes java property file.encoding in the container

XMLWordPrintable

    • Hide
      • Generate a Quarkus application from https://code.quarkus.redhat.com/, e.g check Camel Core [camel-quarkus-core], then click on "Generate your application" button
      • Download the source zip, unzip locally
      • Do podman build using command such as:
        podman build -f Dockerfile.jvm -t code-with-quarkus-jvm
        
      • then run it using:
        podman run -it  localhost/code-with-quarkus-jvm /bin/bash
        
      • In the container, execute java -XshowSettings, and the output showing
        Property settings:
        file.encoding = ANSI_X3.4-1968
        expected:
        Property settings:
        file.encoding = UTF-8
        This cause an issue with special characters. The Dockerfile.jvm has the following conent:
        FROM registry.access.redhat.com/ubi8/openjdk-11:1.11
        
        ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
        
        
        # We make four distinct layers so if there are application changes the library layers can be re-used
        COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
        COPY --chown=185 target/quarkus-app/*.jar /deployments/
        COPY --chown=185 target/quarkus-app/app/ /deployments/app/
        COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/
        
        EXPOSE 8080
        USER 185
        ENV AB_JOLOKIA_OFF=""
        ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
        ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
        

      if the line "ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'" is commented out, then the container has the correct file.encoding as it is taken from the image registry.access.redhat.com/ubi8/openjdk-11:1.11. Is it possible to change the way the application is generated?

      Show
      Generate a Quarkus application from https://code.quarkus.redhat.com/ , e.g check Camel Core [camel-quarkus-core] , then click on "Generate your application" button Download the source zip, unzip locally Do podman build using command such as: podman build -f Dockerfile.jvm -t code-with-quarkus-jvm then run it using: podman run -it localhost/code-with-quarkus-jvm /bin/bash In the container, execute java -XshowSettings, and the output showing Property settings: file.encoding = ANSI_X3.4-1968 expected: Property settings: file.encoding = UTF-8 This cause an issue with special characters. The Dockerfile.jvm has the following conent: FROM registry.access.redhat.com/ubi8/openjdk-11:1.11 ENV LANG= 'en_US.UTF-8' LANGUAGE= 'en_US:en' # We make four distinct layers so if there are application changes the library layers can be re-used COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/ COPY --chown=185 target/quarkus-app/*.jar /deployments/ COPY --chown=185 target/quarkus-app/app/ /deployments/app/ COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/ EXPOSE 8080 USER 185 ENV AB_JOLOKIA_OFF="" ENV JAVA_OPTS= "-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager" ENV JAVA_APP_JAR= "/deployments/quarkus-run.jar" if the line "ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'" is commented out, then the container has the correct file.encoding as it is taken from the image registry.access.redhat.com/ubi8/openjdk-11:1.11. Is it possible to change the way the application is generated?
    • ---

      The file encoding for java has been changed in the container created using Dockerfile.jvm, which is a part of the application generated from https://code.quarkus.redhat.com/

            adamevin andy damevin
            rhn-support-leiyu Lei Yu (Inactive)
            Fedor Dudinskii Fedor Dudinskii
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: