mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-02 20:40:36 +00:00
docker: Check for selinux before using --security-opt
(#167)
Before using `--security-opt label=disable`, check that SELinux is enabled. Otherwise, the option is not relevant. This fixes errors on Mac. Closes #166 Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
parent
9b93ee2c2b
commit
204eb6d810
3 changed files with 12 additions and 6 deletions
|
@ -28,8 +28,10 @@ docker_image="$1"
|
|||
host_build_dir="$2"
|
||||
container_build_dir="/app/builds"
|
||||
|
||||
# Disable SELinux labels
|
||||
DOCKER_OPTS="$DOCKER_OPTS --security-opt label=disable"
|
||||
if command -v selinuxenabled &> /dev/null && selinuxenabled; then
|
||||
# Disable SELinux labels
|
||||
DOCKER_OPTS="$DOCKER_OPTS --security-opt label=disable"
|
||||
fi
|
||||
|
||||
mounts=""
|
||||
if [ -n "$LLAMA_STACK_DIR" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue