openssh-server doesn't start in Docker container
Container vs. Image
The RUN
statement is used to run commands when building the docker image.
With ENTRYPOINT
and CMD
you can define what to run when you start a container using that image.
See Dockerfile Reference for explanations how to use them.
Services
There is not preinstalled init-system in the containers, so you cannot use service ... start
in a container.
Consider starting the process in the CMD
statement as foreground process or use an init-system like Phusion or Supervisord.