Create Directory if not Exists in DockerFile

Create Directory if not Exists in DockerFile

To create a Directory that does not exist you have to use the --p command along with the mkdir command. Becausemkdir isn't recursive by default -- it expects the immediate parent directory to exist.

Create Directory if not Exists in DockerFile

Use mkdir command to with --p flag to

mkdir -p /var/www/app

Or

RUN mkdir -p ... 




πŸ”₯ 286 Views
Apr 6, 2022