You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
494 B
Bash
20 lines
494 B
Bash
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
cd $SCRIPT_DIR/..
|
|
|
|
echo "Building Nix environment in docker"
|
|
IMAGE=$(docker build . -q -f ./deploy/Dockerfile)
|
|
|
|
echo "Starting interactive shell"
|
|
docker run \
|
|
--name "nixos-shell" \
|
|
--rm \
|
|
--mount type=bind,src=$(pwd)/,dst=/deploy/ \
|
|
--mount type=bind,src=$(pwd)/deploy/.ssh/,dst=/root/.ssh/,readonly=true \
|
|
--mount type=volume,src=nixCache,dst=/nix/ \
|
|
-it $IMAGE \
|
|
bash
|
|
|