diff --git a/Dockerfile b/Dockerfile index 6ed8ef3..4a1c43d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,3 +11,4 @@ EXPOSE 6119 ENTRYPOINT ["/usr/local/bin/pid1.bash"] COPY scripts/pid1.bash /usr/local/bin/ +CMD bash diff --git a/Makefile b/Makefile index 04f776a..0a1a32d 100644 --- a/Makefile +++ b/Makefile @@ -11,4 +11,4 @@ help: ## Show this message .PHONY: docker docker: ## Run shell with source code and deps inside Docker scripts/docker.bash build . -t fast-sandbox --build-arg "UID=$(UID)" - scripts/docker.bash run -it --rm -v "$PWD" -p 6119:6119 fast-sandbox + scripts/docker.bash run -it --rm -v "$(PWD):/home/docker/src" -p 6119:6119 fast-sandbox diff --git a/scripts/pid1.bash b/scripts/pid1.bash index ce990ca..21b5099 100755 --- a/scripts/pid1.bash +++ b/scripts/pid1.bash @@ -7,4 +7,8 @@ export LANG=C.UTF-8 export LC_ALL=C.UTF-8 export SHELL="$(which bash)" +if [[ -d src ]]; then + cd src +fi + exec "$@"