I\'m trying to run a script during my building process in my Dockerfile. But it doesn\'t seems to work.
I tried that way:
FROM php:7-fpm
ADD bootstra
It's best practice to use COPY instead of ADD when you're copying from the local file system to the image. Also, I'd recommend creating a sub-folder to place your content into. If nothing else, it keeps things tidy. Make sure you mark the script as executable using chmod.
Here, I am creating a scripts sub-folder to place my script into and run it from:
RUN mkdir -p /scripts
COPY script.sh /scripts
WORKDIR /scripts
RUN chmod +x script.sh
RUN script.sh