0

Hello i am a beginner in Docker. I just wanted to add user for ftp server so i used command "adduser lal". As it is interactive console, it will ask for password. But how to follow this step in single Dockerfile. My docker looks like:

# getting base image debian
FROM debian


RUN apt-get update && apt-get install -y s3fs

RUN apt-get install -y vsftpd
RUN apt-get update && apt-get install -y ftp
RUN cp /etc/vsftpd.conf /etc/vsftpd.conf.orig
RUN adduser lal
RUN mkdir /home/lal/ftp
RUN chown nobody:nogroup /home/lal/ftp
RUN chmod a-w /home/lal/ftp
RUN mkdir /home/lal/ftp/files
RUN chown lal:lal /home/lal/ftp/files


CMD [ "echo","Hello World...! from my first docker image" ]

It would be helpful for me if you give any advise regarding my Dockerfile too. Thank you for your precious time.

Lal Kumar Rai
  • 327
  • 7
  • 21

0 Answers0