diff --git a/dev-shell.sh b/dev-shell.sh index e16693b..7d72b93 100755 --- a/dev-shell.sh +++ b/dev-shell.sh @@ -1,8 +1,10 @@ #!/bin/bash +env_dir="${PWD}/test-env" + # Function to execute custom commands before exiting down() { - docker compose --env-file=$PWD/docker/.env.dev -f $PWD/docker/docker-compose.yml down --remove-orphans + docker compose --env-file=$env_dir/.env.dev -f $env_dir/docker-compose.yml down --remove-orphans # remove the docker runtime part docker volume rm docker_docker-runtime } @@ -11,4 +13,4 @@ down() { trap down EXIT mkdir -p $PWD/.device/sysroot -docker compose --env-file=$PWD/docker/.env.dev -f $PWD/docker/docker-compose.yml run -e DEV_USER=$(id -u) -e DEV_GROUP=$(id -g) sotactl $@ +docker compose --env-file=$env_dir/.env.dev -f $env_dir/docker-compose.yml run -e DEV_USER=$(id -u) -e DEV_GROUP=$(id -g) sotactl $@ diff --git a/docker/.env.dev b/test-env/.env.dev similarity index 76% rename from docker/.env.dev rename to test-env/.env.dev index e5ceadc..71db06f 100644 --- a/docker/.env.dev +++ b/test-env/.env.dev @@ -14,3 +14,6 @@ BOOTDIR=$DEV_DIR/boot # /var/lib/docker DOCKER_DATA_ROOT=$DOCKER_DIR/data + +# Dir containing Dockerfile and build context to build the "sotactl" image +SOTACTL_DOCKER_DIR=$PWD/docker diff --git a/docker/docker-compose.yml b/test-env/docker-compose.yml similarity index 96% rename from docker/docker-compose.yml rename to test-env/docker-compose.yml index 435794e..92825b7 100644 --- a/docker/docker-compose.yml +++ b/test-env/docker-compose.yml @@ -11,7 +11,7 @@ services: sotactl: build: - context: . + context: ${SOTACTL_DOCKER_DIR} args: AKLITE_VER: master dockerfile: Dockerfile