2

I am trying to create an Image which will run ftp server on centos. Dockerfile content is as below:

FROM centos
 
RUN \
  yum update -y && \
  yum install vsftpd -y 
 
EXPOSE 21
CMD vsftpd -DFOREGROUN

I 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: 9

once I enter 9 and press enter button, it stuck at the same window. Can you please help me, how should I process this?

3

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.

0

The problem is a typo in your build command:

docker build -f webserver .

what's the webserver file you are using for that build if the script is described in the Dockerfile? BTW I have built your image and there is no interactive menu appeared, so just build it))

docker build -t webserver .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.