I have following Dockerfile:
FROM ubuntu
RUN apt-get -y update
RUN apt-get -y install ttf-dejavu
COPY ./soap.sh /
RUN chmod +x /soap.sh
ENTRYPOINT ["/soap.sh"]
CMD ["/script.sh", "arg1"]
I am trying to install SoapUI using above Dockerfile.
Using above Dockerfile, I am able to build the image Successfully as shown below:
root@test00-new:/home/sam/1_Docker# docker build -t balu1 .
Sending build context to Docker daemon 385.8MB
Step 1/8 : FROM ubuntu
---> 1e4467b07108
Step 2/8 : MAINTAINER Sample
---> Running in c6dc0992d25c
Removing intermediate container c6dc0992d25c
---> 7ecd8a4fcbfd
Step 3/8 : RUN apt-get -y update
---> Running in aa6467b0fc5c
---> cd3b7f8f5389
Step 4/8 : RUN apt-get -y install ttf-dejavu
---> Running in 8fcc7ce6ab9f
---> 55649115b86c
Step 5/8 : COPY ./soap.sh /
---> 2c236754e2d5
Step 6/8 : RUN chmod +x /soap.sh
---> Running in 408d72761df5
Removing intermediate container 408d72761df5
---> 17d2afb0bc43
Step 7/8 : ENTRYPOINT ["/soap.sh"]
---> Running in 0b10d8b91d65
Removing intermediate container 0b10d8b91d65
---> a7d0b50d4fdd
Step 8/8 : CMD ["/script.sh", "arg1"]
---> Running in a8ba5d134b5d
Removing intermediate container a8ba5d134b5d
---> d41cffedccda
Successfully built d41cffedccda
Successfully tagged balu1:latest
root@test00-new:/home/sam/1_Docker# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
balu1 latest d41cffedccda 29 seconds ago 351MB
ubuntu latest 1e4467b07108 3 weeks ago 73.9MB
root@test00-new:/home/sam/1_Docker#
But When I run the docker using above image, I am getting the following output:
root@test00-new:/home/sam/1_Docker# docker run balu1 OK
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
This will install SoapUI 5.2.1 on your computer.
OK [o, Enter], Cancel [c]
root@test00-new:/home/sam/1_Docker#
In the above case how to handle user input in Dockerfile?
I need to send a letter o or ENTER as input inside Dockerfile
I tried by running "docker run balu1 0", "docker run balu1 OK" etc. But its not working.
Please guide me on this.