Skip to content

Commit

Permalink
remove host volume mount for recordings
Browse files Browse the repository at this point in the history
  • Loading branch information
cioddi committed Dec 30, 2023
1 parent 85277b8 commit 816417f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
Binary file modified examples/exec_test/assets/exec_test_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/save_test/assets/save_test_1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/save_test/assets/save_test_3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/save_test/assets/save_test_6.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified examples/save_test/assets/save_test_8.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/executeCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,11 @@ const initializeRuntime = async (options: { baseImage?: string }) => {
await stopTmpContainer();

// start the runtime container
const containerStartCmd = `docker run ${dockerSockVolume} --group-add docker --group-add sudo --network host -dit --rm --user ${uid}:${gid} -v ${workspacePath}:${workspacePath} ${baseImage}`;
const containerStartCmd = `docker run ${dockerSockVolume} --group-add docker --group-add sudo --network host \
-dit --rm --user ${uid}:${gid} \
-v ${recordingPath} \
-v ${workspacePath}:${workspacePath} \
${baseImage}`;
const startResult = await execProm(containerStartCmd);
containerId = startResult.stdout.trim();
log(
Expand Down Expand Up @@ -270,7 +274,7 @@ export async function executeCommands({
// create a gif of the recorded asciinema cast (better switch to agg)
log(
await execProm(
`docker run --user ${uid}:${gid} --rm -v ${recordingPath}:/data asciinema2/asciicast2gif -s ${config.asciinema.speed} -t monokai /data/${castFilename}.cast /data/${castFilename}.gif`
`docker run --user ${uid}:${gid} --rm --volumes-from ${containerId} asciinema2/asciicast2gif -s ${config.asciinema.speed} -t monokai ${recordingPath}/${castFilename}.cast ${recordingPath}/${castFilename}.gif`
)
);
// remove the asciinema .cast file (maybe we should use it)
Expand Down

0 comments on commit 816417f

Please sign in to comment.