Merge pull request #375 from mkrupcale/wasm-docker-selinux

Use Z option for docker-run volume mount
This commit is contained in:
Max Brunsfeld 2019-07-16 15:10:42 -07:00 committed by GitHub
commit d84e6fafdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -33,12 +33,12 @@ pub fn compile_language_to_wasm(language_dir: &Path, force_docker: bool) -> Resu
let mut volume_string;
if let (Some(parent), Some(filename)) = (language_dir.parent(), language_dir.file_name()) {
volume_string = OsString::from(parent);
volume_string.push(":/src");
volume_string.push(":/src:Z");
command.arg("--workdir");
command.arg(&Path::new("/src").join(filename));
} else {
volume_string = OsString::from(language_dir);
volume_string.push(":/src");
volume_string.push(":/src:Z");
command.args(&["--workdir", "/src"]);
}

View file

@ -67,7 +67,7 @@ if which emcc > /dev/null && [[ "$force_docker" == "0" ]]; then
elif which docker > /dev/null; then
emcc="docker run \
--rm \
-v $(pwd):/src \
-v $(pwd):/src:Z \
-u $(id -u) \
-e EMCC_FORCE_STDLIBS=libc++ \
trzeci/emscripten-slim \