Skip to content

Commit

Permalink
Update create_container.sh
Browse files Browse the repository at this point in the history
Relating to comments in issue #2, added case for `linux-gnu` OSTYPE to implement the internal host when creating the docker container on this platform.
  • Loading branch information
Jbsco authored Nov 28, 2023
1 parent dee7786 commit a149050
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions docker/create_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,20 @@
# Create the docker container with a bind mount:
echo "Creating container..."
. ./docker_config.sh
execute "docker run -d \
--name $DOCKER_CONTAINER_NAME \
--mount type=bind,source=\"$(pwd)\"/../..,target=/share \
$DOCKER_IMAGE_NAME \
sleep infinity"
if [ -n "ON_LINUX" ]; then
execute "docker run -d \
--name $DOCKER_CONTAINER_NAME \
--mount type=bind,source=\"$(pwd)\"/../..,target=/share \
--add-host=host.docker.internal:host-gateway \
$DOCKER_IMAGE_NAME \
sleep infinity"
else
execute "docker run -d \
--name $DOCKER_CONTAINER_NAME \
--mount type=bind,source=\"$(pwd)\"/../..,target=/share \
$DOCKER_IMAGE_NAME \
sleep infinity"
fi

# Run docker provision script inside of container to get things set up:
echo "Provisioning container..."
Expand Down

0 comments on commit a149050

Please sign in to comment.