Hi, we are using ANT build tool to build our application, our build.xml script file have multiple input parameter when we ran ANT then it asks multiple times yes/no questions… But same application we build using docker file then it do not ask any question. Please see my dockerfile sample below:
FROM openjdk:6
MAINTAINER Rama
ENV CATALINA_HOME /usr/local/tomcat
ENV PATH $CATALINA_HOME/bin:$PATH
RUN mkdir -p "$CATALINA_HOME"
WORKDIR $CATALINA_HOME
# Tomcat folder creation inside Docker container
COPY tomcat $CATALINA_HOME
ENV ANT_HOME /usr/local/ant
ENV PATH ${PATH}:/usr/local/ant/bin
# Added ANT tool from host to docker container
ADD apache-ant-1.7.0 /usr/local/ant
# Added application from host to docker container
# TempProject contains build.xml , src and webroot
ADD TempProject /usr/local/TempProject
WORKDIR /usr/local/TempProject
RUN ant
so when ANT run inside docker file then it do not ask any question at console whereas in normal it asks.
we are using docker build command as below to build application (it makes images) docker build --tag=myApp .
Please guide us in which way we can get console input for images.
Thanks Rama
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hi there @ramas,
What I would suggest here is changing the last line from:
To the following:
That way the command would be run during the initialization of the Docker container and not while building the image. That way you should have better control over the parameters that are specified.
Regards, Bobby