From 7178aed4ea53b938fe54230c9a3aa7c471ed0133 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Wed, 21 Jul 2021 11:50:31 +0200 Subject: [PATCH] Add workspace volume mode to batch changes troubleshooting doc (#23068) --- .../references/troubleshooting.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/batch_changes/references/troubleshooting.md b/doc/batch_changes/references/troubleshooting.md index c038ef465adf..912b83e018ab 100644 --- a/doc/batch_changes/references/troubleshooting.md +++ b/doc/batch_changes/references/troubleshooting.md @@ -140,6 +140,24 @@ docker run --rm --init --workdir /work \ Make sure that you put your `steps.run` command in `/tmp-script` (or any other location), replace `` with the name of the Docker image, and `/unzipped-archive-locally` (or any other location) with a local copy of the repository in which you want to execute the steps. +### Does it work if you switch to using the workspace mode using Docker volumes? + +If executing the `steps` in the batch spec fails with a message that looks similar to this one (i.e. permission error) + +``` +/bin/sh: can't open '/tmp/tmp.IbdkiA': Permission denied +``` + +or you're using SELinux or are in a locked-down environment it's possible that Docker bind mounts won't work. + +Try using the `-workspace volume` flag (see [`src batch apply`](../../cli/references/batch/apply.md#flags) for a list of all flags) to make `src` use Docker volumes instead: + +``` +src batch apply -workspace volume -f my-spec.yaml +# or: +src batch preview -workspace volume -f my-spec.yaml +``` + ## Publishing changesets ### Do you have the right credentials?