[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ...user that is numeric and within the range...

Thank you for this, so I added
USER 1001

at the end of the Dockerfile. I seem to be going past the previous stumble block, but now I have something else:

E0415 14:19:22.857331 1 util.go:85] sed: couldn't open temporary file /home/jboss/.m2/sedq0HMAu: Permission denied
I0415 14:19:22.857546 1 sti.go:455] Found pom.xml... attempting to build with 'mvn -e -Popenshift -DskipTests -Dcom.redhat.xpaas.repo.redhatga package -Djava.net.preferIPv4Stack=true '
E0415 14:19:22.895624 1 util.go:85] Picked up JAVA_TOOL_OPTIONS: -Duser.home=/home/jboss -Duser.name=jboss
I0415 14:19:23.127432 1 sti.go:455] Using Apache Maven 3.0.5 (Red Hat 3.0.5-16) 
I0415 14:19:23.127457 1 sti.go:455] Maven home: /usr/share/maven 
I0415 14:19:23.127462 1 sti.go:455] Java version: 1.8.0_65, vendor: Oracle Corporation 
I0415 14:19:23.127466 1 sti.go:455] Java home: /usr/lib/jvm/java-1.8.0-openjdk-
I0415 14:19:23.127472 1 sti.go:455] Default locale: en_US, platform encoding: ANSI_X3.4-1968
I0415 14:19:23.127477 1 sti.go:455] OS name: "linux", version: "3.10.0-327.4.5.el7.x86_64", arch: "amd64", family: "unix"
E0415 14:19:23.143398 1 util.go:85] Picked up JAVA_TOOL_OPTIONS: -Duser.home=/home/jboss -Duser.name=jboss
I0415 14:19:24.212857 1 sti.go:455] [INFO] Error stacktraces are turned on. 
I0415 14:19:24.374638 1 sti.go:455] [ERROR] Could not create local repository at /home/jboss/.m2/repository -> [Help 1]
I0415 14:19:24.376140 1 sti.go:455] org.apache.maven.repository.LocalRepositoryNotAccessibleException: Could not create local repository at /home/jboss/.m2/repository
I0415 14:19:24.376162 1 sti.go:455] at org.apache.maven.DefaultMaven.validateLocalRepository(DefaultMaven.java:504)
I0415 14:19:24.376169 1 sti.go:455] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:196)
I0415 14:19:24.376173 1 sti.go:455] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
I0415 14:19:24.376177 1 sti.go:455] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
I0415 14:19:24.376181 1 sti.go:455] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
I0415 14:19:24.376185 1 sti.go:455] at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
I0415 14:19:24.376188 1 sti.go:455] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
I0415 14:19:24.376193 1 sti.go:455] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
I0415 14:19:24.376196 1 sti.go:455] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
I0415 14:19:24.376200 1 sti.go:455] at java.lang.reflect.Method.invoke(Method.java:497) 
I0415 14:19:24.376204 1 sti.go:455] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
I0415 14:19:24.376207 1 sti.go:455] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
I0415 14:19:24.376211 1 sti.go:455] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
I0415 14:19:24.376215 1 sti.go:455] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)

As I said, I need to extend the webserver30-tomcat7-openshift:1.2 in a very basic way (add a file that needs to be present for my app).

How do I know which is the right user to put at the end of the script? Is there a docker command that lets me save it from where this Dockerfile is picking up for instance?

On 15 Apr 2016, at 15:49, Ben Parees <bparees redhat com> wrote:

On Fri, Apr 15, 2016 at 9:36 AM, Candide Kemmler <candide intrinsic world> wrote:
I'm confused by the following message that happens during a build:

Build error: image " sha256:2057c3057d1d44eb43065bb04feabb480b19772be2005ede1be87ad4eb21b76a" must specify a user that is numeric and within the range of allowed users

This happens on an image that I have customized from jboss-webserver-3/webserver30-tomcat7-openshift:1.2

My Dockerfile is as follows:

FROM registry.access.redhat.com/jboss-webserver-3/webserver30-tomcat7-openshift:1.2
RUN mkdir /home/jboss/flx
COPY GeoLiteCity.dat /home/jboss/flx/
USER root
RUN chmod 777 /home/jboss/flx/GeoLiteCity.dat

​by default openshift refuses to run s2i builder images that specify a non-numeric user id, and root is particularly bad (because the builder image is going to run as that user).

If you look at our s2i builder images, you'll see they all specify a numeric USER at the end of the dockerfile:


Note that the assemble script will run as that USER, so you need to ensure you've setup the permissions in the image appropriately. (ie in that example you see we setup permissions for uid 1001).


users mailing list
users lists openshift redhat com

Ben Parees | OpenShift

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]