Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
#66: Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Aug 14, 2021
1 parent 17102b1 commit 8cb5195
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/core/rkd/core/standardlib/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,39 @@ def execute(self, context: ExecutionContext) -> bool:
return result

def mount(self, local: str, remote: str, mount_type: str = 'bind', read_only: bool = False) -> None:
"""
Adds a mountpoint
:param local:
:param remote:
:param mount_type:
:param read_only:
:return:
"""

self.mounts.append(Mount(target=remote, source=local, type=mount_type, read_only=read_only))

def add_file_to_copy(self, local: str, remote: str) -> None:
"""
Schedules a file to be copied during execution time
:param local:
:param remote:
:return:
"""

self.to_copy[remote] = local

def in_container(self, cmd: str, workdir: Optional[str] = None, user: Optional[str] = None) -> None:
"""
Execute a shell command inside of the container
:param cmd:
:param workdir:
:param user:
:return:
"""

additional_args = ''

if workdir:
Expand Down

0 comments on commit 8cb5195

Please sign in to comment.