From 078449432a50923a240fc93e1c2c0ff329a2f6b6 Mon Sep 17 00:00:00 2001 From: Daniel Noland Date: Sun, 27 Oct 2024 23:32:49 -0600 Subject: [PATCH] docker fixup --- justfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index e1197009..954d8580 100644 --- a/justfile +++ b/justfile @@ -42,9 +42,18 @@ _dev_env_container := _dpdk_sys_container_repo + "/dev-env:" + _env_branch + "-r _compile_env_container := _dpdk_sys_container_repo + "/compile-env:" + _env_branch + "-rust-" + rust + "-" + DPDK_SYS_COMMIT _network := "host" -export DOCKER_SOCK := x"${DOCKER_SOCK:-/var/run/docker.sock}" export DOCKER_HOST := x"${DOCKER_HOST:-unix:///var/run/docker.sock}" +export DOCKER_SOCK := ``` + set -x + declare -r DOCKER_HOST="${DOCKER_HOST:-unix:///var/run/docker.sock}" + declare -r without_unix="${DOCKER_HOST##unix://}" + if [ -S "${without_unix}" ]; then + printf -- '%s' "${without_unix}" + elif [ -S /var/run/docker.sock ]; then + printf -- '%s' "/var/run/docker.sock" + fi +``` # The git commit hash of the last commit to HEAD # We allow this command to fail in the sterile environment because git is not available there