|
|
@@ -3,6 +3,7 @@ import subprocess
|
|
|
import socket
|
|
|
from pathlib import Path
|
|
|
|
|
|
+is_windows = os.name == "nt"
|
|
|
|
|
|
data_sources = [
|
|
|
Path.home() / "Documents" / "cv",
|
|
|
@@ -29,6 +30,12 @@ def main():
|
|
|
]
|
|
|
if ssh_auth_sock:
|
|
|
volumes += [f"{ssh_auth_sock}:{ssh_auth_sock}:Z"]
|
|
|
+
|
|
|
+ if is_windows:
|
|
|
+ ssh_key_name = "theenglishway-windows"
|
|
|
+ else:
|
|
|
+ ssh_key_name = "theenglishway.pub"
|
|
|
+
|
|
|
volumes += [
|
|
|
f"{vol}:/mnt/source{vol}:ro" for vol in data_sources
|
|
|
]
|
|
|
@@ -46,6 +53,8 @@ def main():
|
|
|
container_name,
|
|
|
"-e SSH_AUTH_SOCK",
|
|
|
"-e TZ=Europe/Paris",
|
|
|
+ "-e",
|
|
|
+ f"SSH_KEY_NAME={ssh_key_name}",
|
|
|
"--security-opt=label=disable"
|
|
|
] + volume_args + [image_name]
|
|
|
print(args)
|