Skip to content

docker_run fails if selinux enabled #218

@safforddr

Description

@safforddr

On systems with selinux enabled (such as Fedora), the bind mount of /workspace fails.
This is easily fixed with the ":Z" option on the bind mount, which labels the mount properly.
Specifically in docker_run changing the last line
docker run -v "$(pwd):/workspace" -w /workspace "${docker_image}" "$@"
to
docker run -v "$(pwd):/workspace:Z" -w /workspace "${docker_image}" "$@"
makes the invocation work fine on Fedora.

This should not break other systems, but I only tested on Fedora.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions