From 2e125a337ef013a7ec24a69c501dec89849c87f5 Mon Sep 17 00:00:00 2001 From: Ned Bingham Date: Fri, 26 May 2023 07:13:39 -0400 Subject: [PATCH] making it possible to have the tech files outside of your home directory --- Dockerfile | 2 +- bcli-develop.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 16b7a0e..2e9cfa9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -170,7 +170,7 @@ RUN cp -r pr/* /opt/cad/bin RUN mkdir "/host" WORKDIR "/host" RUN rm -rf /opt/cad/conf -RUN ln -s "/host/tech" "/opt/cad/conf" +RUN mkdir /opt/cad/conf ENV USER "bcli" ENV USER_ID "1000" diff --git a/bcli-develop.sh b/bcli-develop.sh index 67f42ac..aee35c9 100644 --- a/bcli-develop.sh +++ b/bcli-develop.sh @@ -1,7 +1,7 @@ bcli() { if [ "$1" = "up" ]; then - docker run --rm -d -v $HOME:/host --name "bcli-develop" -h "bcli-develop" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" public.ecr.aws/l5h5o6z4/broccoli-cli:latest > /dev/null - #docker run --rm -d -v $HOME:/host --name "bcli-develop" -h "bcli-develop" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" ${BCLI_IMAGE:-public.ecr.aws/l5h5o6z4/broccoli-cli:latest} > /dev/null + docker run --rm -d -v $HOME:/host -v "/opt/tech:/opt/cad/conf" --name "bcli-develop" -h "bcli-develop" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" public.ecr.aws/l5h5o6z4/broccoli-cli:latest > /dev/null + #docker run --rm -d -v $HOME:/host -v "${BCLI_TECH:/opt/tech}:/opt/cad/conf" --name "bcli-develop" -h "bcli-develop" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" ${BCLI_IMAGE:-public.ecr.aws/l5h5o6z4/broccoli-cli:latest} > /dev/null echo "bcli-develop started" elif [ "$1" = "down" ]; then docker stop bcli-develop > /dev/null