Skip to content

Commit b9d8f8c

Browse files
authored
fixed docker folder permission issue (#79)
1 parent 48c64bc commit b9d8f8c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

python/rpdk/python/codegen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
import os
23
import shutil
34
import zipfile
45
from pathlib import PurePosixPath
@@ -251,6 +252,7 @@ def _docker_build(cls, external_path):
251252
auto_remove=True,
252253
volumes=volumes,
253254
stream=True,
255+
user=f"{os.geteuid()}:{os.getgid()}",
254256
)
255257
except RequestsConnectionError as e:
256258
# it seems quite hard to reliably extract the cause from

tests/plugin/codegen_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ def test__docker_build_good_path(plugin, tmp_path):
244244
auto_remove=True,
245245
volumes={str(tmp_path): {"bind": "/project", "mode": "rw"}},
246246
stream=True,
247+
user=ANY,
247248
)
248249

249250

@@ -277,4 +278,5 @@ def test__docker_build_bad_path(plugin, tmp_path, exception):
277278
auto_remove=True,
278279
volumes={str(tmp_path): {"bind": "/project", "mode": "rw"}},
279280
stream=True,
281+
user=ANY,
280282
)

0 commit comments

Comments
 (0)