debugdockerMinor
Unable to build Image as it is asking some input
Viewed 0 times
imageunableinputsomeaskingbuild
Problem
I am trying to create an Image which will run ftp server on centos. Dockerfile content is as below:
I am running below command :
which is asking me input as below:
once I enter 9 and press enter button, it stuck at the same window. Can you please help me, how should I process this?
FROM centos
RUN \
yum update -y && \
yum install vsftpd -y
EXPOSE 21
CMD vsftpd -DFOREGROUNI am running below command :
docker build -f webserver .which is asking me input as below:
Please select the geographic area in which you live. Subsequent configuration
questions will narrow this down by presenting a list of cities, representing
the time zones in which they are located.
1. Africa 4. Australia 7. Atlantic 10. Pacific 13. Etc
2. America 5. Arctic 8. Europe 11. SystemV
3. Antarctica 6. Asia 9. Indian 12. US
Geographic area: 9once I enter 9 and press enter button, it stuck at the same window. Can you please help me, how should I process this?
Solution
The
docker build process is non-interactive. You have to find a way to make it not ask for anything. The way to do that is by creating the necessary config files and placing them in the correct locations through the Dockerfile before installing vsftpd. The questions are there simply for vsftpd to generate a/some configuration file[s] for itself. You create one beforehand and place it correctly using the copy command before run yum install. If vsftpd finds the valid config file[s], it won't ask for anything anymore.Context
StackExchange DevOps Q#12255, answer score: 3
Revisions (0)
No revisions yet.