Skip to content

Commit 843382e

Browse files
author
Alan Christie
committed
fix: Now injects /bin/sh (experiment)
1 parent 273d038 commit 843382e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/jote/compose.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
image: {image}
2626
container_name: {job}-{test}-jote
2727
user: '{uid}'
28-
entrypoint: /bin/sh
29-
command: {working_directory}/{instance_directory}/command
28+
entrypoint: {working_directory}/{instance_directory}/command
29+
command: []
3030
working_dir: {working_directory}
3131
volumes:
3232
- /var/run/docker.sock:/var/run/docker.sock
@@ -175,7 +175,10 @@ def create(self) -> str:
175175
# Now write the command to the instance directory, as `command`.
176176
command_path: str = f"{inst_path}/command"
177177
with open(command_path, "wt", encoding="UTF-8") as command_file:
178-
command_file.write(self._command)
178+
command_file.write("#!/bin/sh\numask 0002\n")
179+
command_file.write(self._command + "\n")
180+
# And set read/write/execute permission...
181+
os.chmod(command_path, 0o775)
179182

180183
# nextflow config?
181184
if self._image_type == "nextflow":

0 commit comments

Comments
 (0)