mirror of
https://github.com/kingomarnajjar/desktop-environment.git
synced 2026-07-31 02:26:44 +10:00
start-of-test-script
This commit is contained in:
parent
4a21e6ad85
commit
6bc6829759
1 changed files with 24 additions and 0 deletions
24
docker/scripts/test.sh
Executable file
24
docker/scripts/test.sh
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
REPO_ROOT=$(dirname $(readlink -f $0))/../..
|
||||
|
||||
# Export desktop environment shell configuration
|
||||
eval "$($REPO_ROOT/docker/scripts/environment.sh)"
|
||||
|
||||
# Ensure the desktop environment network exists
|
||||
docker network create $DESKTOP_ENVIRONMENT_DOCKER_NETWORK
|
||||
|
||||
# Start the desktop environment container
|
||||
docker run \
|
||||
--detach \
|
||||
--env DESKTOP_ENVIRONMENT_USER \
|
||||
--name $DESKTOP_ENVIRONMENT_CONTAINER_NAME \
|
||||
--rm \
|
||||
--user $DESKTOP_ENVIRONMENT_USER \
|
||||
--workdir $DESKTOP_ENVIRONMENT_USER_HOME \
|
||||
$DESKTOP_ENVIRONMENT_REGISTRY/$DESKTOP_ENVIRONMENT_CONTAINER_NAME:$DESKTOP_ENVIRONMENT_CONTAINER_TAG \
|
||||
sleep infinity
|
||||
|
||||
# Wait until the desktop environment container is running before proceeding
|
||||
until docker inspect $DESKTOP_ENVIRONMENT_CONTAINER_NAME | grep Status | grep -m 1 running >/dev/null; do sleep 1; done
|
||||
|
||||
# Start the desktop environment inside the container
|
||||
$REPO_ROOT/docker/scripts/exec.sh /home/$DESKTOP_ENVIRONMENT_USER/.config/scripts/startup.sh
|
||||
Loading…
Add table
Reference in a new issue