You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run PMLC 3.0.0 inside a Docker container on Linux, the resources directory gets written to ?/.config. It may be something in how the resources directory string determines home or wherever, when it is inside the container context.
# DockerfileFROM alpine:latest
RUN wget "https://github.com/pml-lang/pml-companion/releases/download/v3.0.0/pmlc" && chmod +x pmlc
RUN pmlc -version
# orENTRYPOINT ["/pmlc", "-version"]
INFO: Creating shared data directory ?/.config/PML_Companion/3_0
PMLC 3.0.0 2022-08-19
The ? folder appears to be created relative to the current directory. As a side effect, if you mount the current directory to the container and WORKDIR into it inside the Dockerfile, the ? folder with the .config/PML resources subdirectory will be generated inside the current directory, with root:root as the owner.
The text was updated successfully, but these errors were encountered:
As can be seen: The config root directory is retrieved from the OS environment variable XDG_CONFIG_HOME. If this variable is not defined then OSDirectories.USER_HOME_DIRECTORY + "/.config" is used. OSDirectories.USER_HOME_DIRECTORY is defined as follows:
... which is the reason why the path evaluates to ?/.config.
Hence I suggest to explicitly specify the config root directory by defining OS environment variable XDG_CONFIG_HOME in your Docker config file.
Please let me know if this solves your problem.
PS: To avoid this situation in the future, all functions in DirectoryConfig.java using OSDirectories.USER_HOME_DIRECTORY (i.e. System.getProperty ( "user.home" )) should check this value. If it is ?, then there should be a helpful message displayed in the terminal, so that the user knows how to solve the problem.
all functions OSDirectories.USER_HOME_DIRECTORY (i.e. System.getProperty ( "user.home" )) should check this value. If it is ?, then there should be a helpful message
When I run PMLC 3.0.0 inside a Docker container on Linux, the resources directory gets written to
?/.config
. It may be something in how the resources directory string determines home or wherever, when it is inside the container context.The
?
folder appears to be created relative to the current directory. As a side effect, if you mount the current directory to the container andWORKDIR
into it inside the Dockerfile, the?
folder with the.config/PML
resources subdirectory will be generated inside the current directory, withroot:root
as the owner.The text was updated successfully, but these errors were encountered: