Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docker scripts under Windows #9

Merged
merged 7 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading