question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

/app not readable when running on Openshift

See original GitHub issue

/app folder permissions is set to 0700 on docker version 1.13.1 on Redhat Enterprice 7.5:

/ # ls -al / | grep app
drw-------    1 root     root          4096 Jul 10 07:49 app

Expected behavior: /app folder permissions should be 0755, as it is with docker version 18.03.1-ce

/ # ls -al / | grep app
drwxr-xr-x    1 root     root          4096 Jul 10 07:49 app

Steps to reproduce: Build using configuration pasted below

Environment: Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Package version: docker-1.13.1-63.git94f4240.el7.x86_64 Go version: go1.9.2 Git commit: 94f4240/1.13.1 Built: Mon Apr 30 15:45:42 2018 OS/Arch: linux/amd64 Experimental: false Static hostname: node Icon name: computer-server Chassis: server Machine ID: <machine_id> Boot ID: <boot_it> Operating System: OpenShift Enterprise CPE OS Name: cpe:/o:redhat:enterprise_linux:7.5:GA:server Kernel: Linux 3.10.0-862.3.3.el7.x86_64 Architecture: x86-64

jib-maven-plugin Configuration:

        <plugin>
          <groupId>com.google.cloud.tools</groupId>
          <artifactId>jib-maven-plugin</artifactId>
          <version>0.9.2</version>
          <configuration>
            <allowInsecureRegistries>true</allowInsecureRegistries>
            <from>
              <image>my.local/registry/openjdk:8-alpine</image>
            </from>
            <to>
              <image>my.local/registry/${project.artifactId}:${project.version}</image>
            </to>
            <container>
              <ports>
                <port>8080</port>
                <port>8081</port>
              </ports>
              <jvmFlags>-Djava.security.egd=file:/dev/./urandom</jvmFlags>
            </container>
          </configuration>
        </plugin>

Log output: Error: Could not find or load main class my.package.Application

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
chanseokohcommented, Aug 1, 2018

Install the SNAPSHOT version: cd jib/jib-maven-plugin && ./mvnw install

./mvnw -DskipTests install if tests are not passing.

1reaction
chanseokohcommented, Jul 18, 2018

@ssoerensen we’ll have to look into this, but it seems like you are familiar with Docker and at least you can work around this, e.g., by manipulating the image locally?

BTW, if you want to see how Jib would create Dockerfile, you can do mvn jib:exportDockerContext and go to target/jib-docker-context. (You can actually build an image yourself in that directory.) The Dockefile will look like

FROM gcr.io/distroless/java

COPY libs /app/libs/
COPY resources /app/resources/
COPY classes /app/classes/

ENTRYPOINT ["java","-cp","/app/libs/*:/app/resources/:/app/classes/","org.springframework.samples.petclinic.PetClinicApplication"]
CMD []

I wonder if RUN chmod -R go+r /app would work on 1.13.1.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Investigating pod issues - Troubleshooting | Support
Understanding pod error states; Reviewing pod status; Inspecting pod and container logs; Accessing running pods; Starting debug pods with root access ...
Read more >
Troubleshooting Java applications on OpenShift
In this respect, I want to present in this blog a few approaches for troubleshooting Java applications running on OpenShift.
Read more >
Troubleshooting Red Hat OpenShift applications with ...
Learn how these two helpful tools in the Red Hat OpenShift command-line client can help you troubleshoot your applications.
Read more >
How to fix permission errors in pods using service accounts
Learn how to change a default security context constraint (SCC) in OpenShift to manage permissions within a cluster.
Read more >
Troubleshooting OpenShift Internal Networking
This is one that is often overlooked. Sometimes the issue is not an OpenShift problem but instead has to do with the running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found