0

In my docker file I have this command to create directories :

RUN   mkdir -p logs/{shell,security,errors}

However, it ends up creating these on my container :

{shell,security,errors}

How can I create directories without also including the curly braces?

Daniel Baker
  • 75
  • 2
  • 9

1 Answers1

1

You should try with shell for loop

RUN for i in shell security errors; do  mkdir "/logs/$i"; done

This should work.

Richard Rublev
  • 7,718
  • 16
  • 77
  • 121