Why not start the container?

Do according to the manual , here is my Docker file
FROM jenkins/jenkins:lts
FROM opensuse

USER root
RUN zypper in -y sudo libltdl7
RUN echo "jenkins ALL=NOPASSWD: ALL" >> /etc/sudoers

USER jenkins
# Here you can install some Jenkins plugins if you want

Make the image
docker build-t jenkinsdocker .
After that, try to run the image
docker run-d-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker-p 8765:8080 -p 50000:50000 -v /var/opt/jenkins_home:/var/jenkins_home jenkinsdocker

To get that error when starting the container:
docker: Error response from daemon: No command specified.
See 'docker run --help'.

What could be the problem?I just added extra folder. Run standard image with the same parameters works fine.
June 10th 19 at 16:37
1 answer
June 10th 19 at 16:39
Solution
Add at the end of the dockerfile COMMAND or copy the file entrypoint.sh with the launch of the jenkins:
sh /usr/local/bin/jenkins.sh
Well, when starting the container add command /bin/bash /usr/local/bin/jenkins.sh
problem bypassed that started the jenkins container without creating its container,went to the shell of the container and installed the necessary library.
Thanks for the advice! - sim_Schaden49 commented on June 10th 19 at 16:42
Make the container, then each time not to install a library. - maverick64 commented on June 10th 19 at 16:45
I still when you upgrade jenkins,it will be necessary to put a new container and put the correct library - sim_Schaden49 commented on June 10th 19 at 16:48
But if to build it? - maverick64 commented on June 10th 19 at 16:51
good idea, I think that with the new update, exactly this!
Thank you!) - sim_Schaden49 commented on June 10th 19 at 16:54

Find more questions by tags LinuxDocker