I’m looking to use docker more frequently, and I ended up with a template directory structure a bit like:
My-New-Project/ |- Dockerfile |- build.sh |- start.sh |- src/...
start.sh are just the usual
docker build -t my-new-project . and
docker run -p 8888:8888 -v $(pwd):/workdir my-new-project
However, I need to modify the image name in
start.sh for every new project – how could I use bash to set the image name based on the directory basename.
Also, if there are best practices against doing what I’m doing please let me know.
Source: Docker Questions