navi/scripts/docker
2019-09-28 23:58:00 -03:00

18 lines
No EOL
421 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
debian="${1:-false}"
if $debian; then
image="debian"
setup_cmd="apt update; apt install -y git curl;"
else
image="ellerbrock/alpine-bash-git"
fi
docker run \
-it \
--entrypoint /bin/bash \
-v "$(pwd):/navi" \
"$image" \
-c "${setup_cmd:-}git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf && yes | ~/.fzf/install; export PATH=$PATH:/navi; bash"