Skip to content

Commit

Permalink
Merge pull request #9 from Jbsco/main
Browse files Browse the repository at this point in the history
Update docker scripts under Windows
  • Loading branch information
dinkelk authored Nov 28, 2023
2 parents 0772b6d + d08966a commit 983eb1c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 22 deletions.
6 changes: 1 addition & 5 deletions docker/create_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ execute "docker run -d \

# Run docker provision script inside of container to get things set up:
echo "Provisioning container..."
if [ -n "$ON_WINDOWS" ]; then
execute "winpty docker exec -u user $DOCKER_CONTAINER_NAME //share//adamant_example//docker//env//provision//provision_container.sh"
else
execute "docker exec -u user $DOCKER_CONTAINER_NAME /share/adamant_example/docker/env/provision/provision_container.sh"
fi
execute "docker exec -u user $DOCKER_CONTAINER_NAME //share//adamant_example//docker//env//provision//provision_container.sh"

echo "Finished creating container \"$DOCKER_CONTAINER_NAME\"."
execute "docker ps -a"
Expand Down
7 changes: 0 additions & 7 deletions docker/docker_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,6 @@ DOCKER_IMAGE_NAME="ghcr.io/lasp/adamant:example-latest"
export DOCKER_CONTAINER_NAME
export DOCKER_IMAGE_NAME

case "$OSTYPE" in
cygwin|msys|win32)
ON_WINDOWS="yes"
export ON_WINDOWS
;;
esac

# Helper function to print out command as executed:
execute () {
echo "$ $@"
Expand Down
6 changes: 1 addition & 5 deletions docker/login_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,4 @@

. ./docker_config.sh

if [ -n "$ON_WINDOWS" ]; then
execute "winpty docker exec -it -u user $DOCKER_CONTAINER_NAME //bin//bash"
else
execute "docker exec -it -u user $DOCKER_CONTAINER_NAME /bin/bash"
fi
execute "docker exec -it -u user $DOCKER_CONTAINER_NAME //bin//bash"
6 changes: 1 addition & 5 deletions docker/start_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,5 @@

. ./docker_config.sh
execute "docker start $DOCKER_CONTAINER_NAME"
if [ -n "$ON_WINDOWS" ]; then
execute "winpty docker exec -u user $DOCKER_CONTAINER_NAME //share//adamant_example//docker//env//start_unison.sh &"
else
execute "docker exec -u user $DOCKER_CONTAINER_NAME /share/adamant_example/docker/env/start_unison.sh &"
fi
execute "docker exec -u user $DOCKER_CONTAINER_NAME //share//adamant_example//docker//env//start_unison.sh &"
execute "docker ps -a"

0 comments on commit 983eb1c

Please sign in to comment.