[Docker] Use an absolute path for the entrypoint
See original GitHub issueDescribe the bug
When using the docker image, specifying /data
twice is a bit confusing:
docker run -it -v /path/to/diagrams:/data minlag/mermaid-cli -i /data/diagram.mmd
Expected behavior
The following syntax would be easier:
docker run -it -v `pwd`:/data minlag/mermaid-cli -i ./path/to/diagram.mmd
Solution
Define an absolute path for the entrypoint and set the workdir to /data
ADD puppeteer-config.json /puppeteer-config.json
WORKDIR /data
ENTRYPOINT ["/home/mermaidcli/node_modules/.bin/mmdc", "-p", "/puppeteer-config.json"]
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Set absolute path for docker entrypoint · a56aaea410 - OpenDev
In case dragonflow is used as a base image for another docker image, and the WORKDIR is set to something other than /opt/dragonflow...
Read more >docker - entrypoint file not found - Stack Overflow
I had this problem with Docker for Windows and the solution was changing the entrypoint script file from CRLF -> LF.
Read more >Understand ENTRYPOINT - General Discussions
Hi, I followed the [example] to publish an ASP.NET Application to docker container.
Read more >Latest docker update requires absolute path #3214 - GitHub
After the latest docker update in windows, I have to use absolute path and change some of my env file, is this expected?...
Read more >Does one have to use absolute paths relative to the container ...
You just need to familiarize with the Dockerfile syntax (i.e. the various FROM, COPY, RUN, ENTRYPOINT, CMD, etc. statements that you can find...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
As a follow up, if the change breaks something, it will be fairly easy to restore the current behaviour with the
--workdir
optionIn that case, I’m open to changing the
Dockerfile
’s defaultWORKDIR
, especially since as @MindaugasLaganeckas said, there’s a low chance of it breaking anything, and it definitely does make using the docker image easier! 😄