diff --git a/Dockerfile b/Dockerfile index 2fb9cb2..909db46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,5 +23,5 @@ ENV py_requirements=./requirements.txt ENV apt_requirements=./requirements-apt.txt ENV app=main:app ENV opts='' -ENV PATH=.:${PATH} +ENV PATH=./:./bin:${PATH} CMD start.sh diff --git a/README.md b/README.md index e49e23e..071fe3c 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,12 @@ you can: - change requirement file path for apt install by apt_requirements environment variable. - change requirement file path for pip install by py_requirements environment variable. - change upgrade strategy for pip install by pip_install_opt environment variable. +- use your own start.sh (boot up script) to full control boot procedure. in below case, ${PWD}/start.sh or ${PWD}/bin/start.sh if exists and it is executable. ```bash docker run --rm -it -p 8000:8000 -v ${PWD}:${PWD} -w ${PWD} -e py_requirements=${PWD}/requirements.txt -e pip_install_opt='--upgrade --upgrade-strategy eager' -e apt_requirements=${PWD}/requirements-apt.txt -e app=main:app -e opts='--host 0.0.0.0 --reload --reload-include "*.py" --reload-include "*.conf"' itaru2622/fastapi:bookworm # -# the above cmd start docker container with: +# the above cmd starts docker container via (/usr/local/bin/)start.sh with: # apt install -y ${apt_requirements} pip3 install -r ${py_requirements} ${pip_install_opt}