Reputation: 109
I have to run my .sh script in Dockerfile based on "grafana/grafana" but I'm not sure how to do it.
FROM grafana/grafana
COPY setup.sh /setup.sh
CMD ["/bin/bash", "/setup.sh"]
after docker run
my script is not running. I guess it due to in grafana Dockerfile runs another sh script.
Upvotes: 0
Views: 7553
Reputation: 367
There are two ways to do it inside Dockerfile
RUN <command>
(shell form, the command is run in a shell, which by default is /bin/sh -c on Linux or cmd /S /C on Windows)
RUN ["executable", "param1", "param2"]
(exec form)
Upvotes: 1