Skip to content

Commit aa70ca5

Browse files
author
Alan Christie
committed
Now inserts user and group IDs into the compose file
1 parent e284527 commit aa70ca5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

jote/compose.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
services:
1717
job:
1818
image: {image}
19+
user: '{uid}:{gid}'
1920
command: {command}
2021
working_dir: {working_directory}
2122
environment:
@@ -115,6 +116,8 @@ def create(self) -> str:
115116
# Write the Docker compose content to a file to the test directory
116117
variables: Dict[str, str] = {'test_path': project_path,
117118
'image': self._image,
119+
'uid': os.geteuid(),
120+
'gid': os.getegid(),
118121
'command': self._command,
119122
'project_directory': self._project_directory,
120123
'working_directory': self._working_directory,

0 commit comments

Comments
 (0)