0

My cmd instruction in dockerfile is:

CMD /etc/init.d/ssh start && su - gpadmin bash -c /home/gpadmin/entrypoint.sh && tail -f /dev/null

I want to convert it to ENTRYPOINT instruction. My entrypoint script file is entrypoint.sh

I want to enter the entrypoint script with gpadmin user and also i want the container to stay alive with docker run command that is why i am using tail -f /dev/null command

COBHC
  • 67
  • 1
  • 8
  • A Docker container generally wraps a process. What should that process be? (Why is it important to have a container blocking on a read forever?) Is there any particular reason you want the harder-to-override `ENTRYPOINT` over `CMD`? What have you already tried, and what issue are you running into? – David Maze Nov 02 '21 at 18:25
  • (In the abstract I'd probably recommend `USER gpadmin`, `CMD entrypoint.sh` launching a foreground process, and avoiding the ssh daemon and `tail` process.) – David Maze Nov 02 '21 at 18:26

0 Answers0