This is a similar question. However I am using dockerfile to automate php init
and I am unsure as to how to choose a default environment i.e. production or development when doing a docker build
. My dockerfile is as
RUN npm install -g grunt-cli \
&& grunt \
&& curl --silent --show-error https://getcomposer.org/installer | php \
&& php composer.phar \
&& php init
On building the dockerfile the RUN
will execute php init and move to the next step as it receives no input. Here's the log:
Yii Application Initialization Tool v1.0
Which environment do you want the application to be initialized in?
[0] Development
[1] Production
Your choice [0-1, or "q" to quit]
Quit initialization.
Removing intermediate container 8f33b171f111
---> 83cb0a4ee43e
Step 33/35 : EXPOSE 8080
How to automatically pass a value so that it does not quit?