-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
touch: cannot touch 'CONTAINER_ALREADY_STARTED_PLACEHOLDER': Permission denied #15
Comments
I don't know the jib-maven-plugin, but are you sure that
I burned my fingers several times this way - there are two overlapping worlds, one inside the container, second outside. Inside we set just UID and GID and the whole infrastructure of GlassFish is created under this user. Other users don't have permissions to change files there. I have created another reproducer for this with TestContainers: @SuppressWarnings({"rawtypes", "resource"})
@Container
private final GenericContainer server = new GenericContainer<>(System.getProperty("docker.glassfish.image"))
.withCommand("startserv").withExposedPorts(8080)
.withCreateContainerCmdModifier(t -> t.withUser("2000"))
.withLogConsumer(o -> System.err.print("GF: " + o.getUtf8String())); Then the GlassFish container uses user 1000 for directories, but I started the container as user 2000. And it ended this way:
So I suppose the I tried yet this: @Container
private final GenericContainer server = new GenericContainer<>(System.getProperty("docker.glassfish.image"))
.withCommand("startserv").withExposedPorts(8080)
.withCreateContainerCmdModifier(t -> t.withUser("glassfish-oh-my"))
.withLogConsumer(o -> System.err.print("GF: " + o.getUtf8String())); Result:
Then I tried to use my own host user dmatej - with the same result. Makes sense, when I use name (not id), the same user name must be defined in both worlds, and should have also the same id, especially if we would map external directory for writing from the container. Finally I used the value 1000, and test passed. Where did you execute the id command? Inside the container or on your system? |
I executed the id command inside the container. On my sistem it is different. |
Can you try that with |
You are right. I tried all possibilities of |
You can also try using the new runnable GlassFish Embedded using the same Docker container with version 7.0.18: https://github.com/eclipse-ee4j/glassfish.docker/wiki/Example:-Using-GlassFish-Embedded-with-the-docker-Command. It doesn't modify files in the container and shouldn't have problems even if the |
I get the following error when using com.google.cloud.tools:jib-maven-plugin.
The error is because of this line:
glassfish.docker/7.0.17/docker-entrypoint.sh
Line 11 in ff801b0
I checked UID and GID, both are correct:
Plugin settings:
Error output:
The text was updated successfully, but these errors were encountered: