The folder structure like this:
folder_01
├── folder_02├──Dockerfile_02
├── folder_03├──Dockerfile_03 & example.sh
In the example.sh script, I want to use cd
to navigate back to folder_02
and use the dockerfile_02 to build an image and then navigate back to the current dir (which is folder_03
)
Here's what I tried:
cd ..
cd ./folder_02
docker build . -t image_name
cd ..
cd ./folder_03
In intelliJ, it gave me warning using a subshell to avoid having to cd back
, I read some documentation about it but haven't got a solution, can someone help me?