I have python project and trying to dockerize it. The usecase is as below
User create a parent directory eg titanic
and checkout the github repo
.
The project structure becomes like this
- titanic/
- src/
- Dockerfile
- docker-compose.yml
- .env
Now what I need is, to pass this parent directory name to docker's WORKDIR Command
to create docker image.
In Dockerfile I have, WORKDIR $PROJ_WORKDIR
I tried many different ways to pass the directory name, but it always fails
1. environment:
- PROJ_WORKDIR=titanic
2. In .env, PROJ_WORKDIR=titanic
3. In docker-compose, args:
- PROJ_WORKDIR=titanic
4. In Dockerfile, ENV PROJ_WORKDIR=some_default
Is there a way to configure and access it.