shoestrap/docker-devenv.sh
ViViDboarder 5401bd67c6 Add Dockerfile to run dev env in an image
This is a large, 2.8GB image, but doable!
2021-06-09 17:07:15 -07:00

20 lines
520 B
Bash
Executable File

#! /bin/bash
image_name=devenv-$(whoami)
container_name=$image_name-run
if ! docker inspect "$container_name" > /dev/null ; then
echo "start new"
docker run -it \
--hostname="$(hostname)-docker" \
--env SSH_CLIENT=true \
--env TERM_PROGRAM="$TERM_PROGRAM" \
--env ITERM_PROFILE="$ITERM_PROFILE" \
--volume /:/host \
--name "$container_name" \
"$image_name" fish
else
echo "start existing"
docker start --attach --interactive "$container_name"
fi