-
Notifications
You must be signed in to change notification settings - Fork 236
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
Permissions on /tmp when launching with sbtuser #258
Comments
As a workaround you could try this: |
what does this yield for your image? ➜ ~ docker run -it --rm sbtscala/scala-sbt:eclipse-temurin-jammy-19.0.1_10_1.9.1_3.3.0 ls -al /tmp
total 16
drwxrwxrwt 1 root root 4096 Jul 10 01:31 .
drwxr-xr-x 1 root root 4096 Aug 18 07:23 ..
drwxr-xr-x 1 root root 4096 Dec 9 2022 hsperfdata_root
drwxr-xr-x 2 sbtuser sbtuser 4096 Jul 10 01:31 hsperfdata_sbtuser (I do wonder why that hsperfdata is not deleted) |
After starting the container, I get the same output. I changed the compose to run as root, then I connect later with tramp: # user: sbtuser
working_dir: /home/sbtuser/project
# command: sbt
command: /bin/bash After starting
I've been pulled in a lot of directions lately, so I may need to wait on the Is there anything obvious I can fix with the container? There are a few hacky Thanks |
To be honest I have no idea what this issue is, a minimal reproducer without compose (steps to take) would be welcome |
Not sure if this is related, but I have trouble launching any of the recent docker images with --user=<someone_other_than_root>. It used to work under eclipse-temurin-focal-17.0.5_8_1.8.2_3.2.2, you could -u=1000 via argument or specify a user in compose and it would just work. Maybe I'm doing something wrong but I just get exceptions trying to create the Maybe restricted users without root and sudo aren't that common anymore, but it's an issue for me. |
I'm not sure about the OP's issue, but here you can reproduce mine:
Docker version 24.0.6, build ed223bc (daemon) |
The images can be run under a restricted user with some aggressive volume mapping.
for compose and for regular docker:
|
If you want to run this under a non-root user
will work fine. docker-sbt/eclipse-temurin/Dockerfile Lines 83 to 85 in f79e23d
|
Here's a workaround we are using so that users having id other than 1001(sbtuser's id) don't get error while using sbt. And in regard of this
I don't see any error when I |
I've rebuilt the image with build args
USER_ID
andGROUP_ID
and I think I'm getting an error related to #219I'm launching the container via emacs and then launching SBT via tramp (see: hvesalai/emacs-sbt-mode#170). However, I'm getting the error no matter how I launch the containers. When connect with the root user, it goes away, but then I end up creating extraneous root-owned files in the project.
My current docker compose:
The specific error
The text was updated successfully, but these errors were encountered: