radon-h2020/radon-gmt

Permission error when using (local) particles repository

avanhoorn opened this issue · 4 comments

The goal is to use a local particles repository, which used to work fine but now results in permission problems in the most recent radon-gmt version.

Steps to reproduce:

  1. Starting with a fresh checkout of the radon-gmt repository, everything works fine.
  2. Configuring the local repository
  3. git clone git@github.com:radon-h2020/radon-particles.git
  4. Editing the docker-compose.yml:
     avh@avh-ThinkPad-T450s:~/git_work/RADON/radon-gmt (project/radon)*$ git diff docker-compose.yml 
diff --git a/docker-compose.yml b/docker-compose.yml
index 68b7da2..4fa4219 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,8 +13,8 @@ services:
       CONTAINER_HOSTNAME: ${PUBLIC_HOSTNAME}
       WINERY_FEATURE_RADON: "true"
       WINERY_REPOSITORY_PROVIDER: "yaml"
-      WINERY_REPOSITORY_URL: "https://github.com/radon-h2020/radon-particles"
-    # volumes:
-    #   - <absolute_path_on_host>:/var/repository
+      # WINERY_REPOSITORY_URL: "https://github.com/radon-h2020/radon-particles"
+    volumes:
+      - /home/avh/git_work/RADON/radon-particles:/var/repository
     ports:
       - '8080:8080'

When starting Winery, this results in errors regarding the particles popping up and errors displayed in STDOUT:

winery_1  | 11:57:08.541 [main] DEBUG o.e.w.r.b.f.AbstractFileBasedRepository:99 <init> - Repository root: /var/repository
winery_1  | 11:57:08.546 [main] DEBUG o.e.w.r.b.filebased.YamlRepository:96 <init> - Repository root: /var/repository
winery_1  | 11:57:08.549 [main] DEBUG o.e.w.r.b.f.AbstractFileBasedRepository:99 <init> - Repository root: /var/repository
winery_1  | 11:57:08.809 [main] ERROR o.e.j.internal.storage.file.LockFile:167 lock - Creating lock file /var/repository/.git/config.lock failed
winery_1  | java.nio.file.AccessDeniedException: /var/repository/.git/config.lock
winery_1  | 	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
winery_1  | 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
winery_1  | 	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)

FlxB2 commented

Try to change the owner of all files in the winery repository to your user and set the user id for the winery container in this file https://github.com/radon-h2020/radon-gmt/blob/project/radon/docker-compose.yml#L7 to the same uid that your user has

This also means that you have to re-build the Winery image, right? ... by using docker-compose build.

FlxB2 commented

yes to setup the winery user with the correct permissions

Works, thanks.