Reputation: 3022
I want to do this 2 command.
CMD ["supervisord", "-n",]
CMD ["busybox" , "crond", "-b", "-L", "/dev/stderr"]
I know work only last CMD. So I tried these command one by one.But it doesn't work.
CMD ["supervisord", "-n", "&&" , "busybox" , "crond", "-b", "-L", "/dev/stderr"]
CMD ["supervisord", "-n", ";" , "busybox" , "crond", "-b", "-L", "/dev/stderr"]
CMD supervisord -n; busybox crond -b -L /dev/stderr
If you know how to solve this problem please tell me!
Upvotes: 3
Views: 216
Reputation: 1871
You could add a shell script, for bash:
#!/usr/bin/env bash
# file: startup.sh
supervisord -n
busybox crond -b -L /dev/stderr
then in dockerfile do:
...
COPY startup.sh /startup.sh
RUN chmod 744 /startup.sh
...
CMD ["/startup.sh"]
Upvotes: 2
Reputation: 1095
Can you run both commands on the same line?
CMD supervisord -n && busybox crond -b -L /dev/stderr
Upvotes: 1