ramas
By:
ramas

ANT build tool inside Docker file can not ask option as input at console but ANT ask option without docker

January 16, 2018 209 views
Docker DigitalOcean Debian

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 CATALINAHOME /usr/local/tomcat
ENV PATH $CATALINA
HOME/bin:$PATH

RUN mkdir -p "$CATALINAHOME"
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

Be the first one to answer this question.