Open kckeiks opened 3 years ago
Encounter the same problem when I started docker container on Mac OS 11.5.2.
The error message is
resume-make | make: *** No targets specified and no makefile found. Stop.
resume-make exited with code 2
It seems that the WORKDIR
of pandoc/latex:2.9
image is /data
. (See Image Layer Details)
However, the source code is mounted into the path /home/app/resume
.
As a result, while the container is started and try to run make
command in the /data
path, there is no makefile found.
same issue here
for windows, I had to change the yml file to this to get it to work..
version: '2'
services:
resume-make:
build:
context: .
dockerfile: ./.docker/resume.dockerfile
command: make
container_name: resume-make
image: resume-make
volumes:
- "C:/your_path/pandoc_resume:/data"
But there is still an error with creating a PDF file...
mkdir -p output
PANDOC_VERSION=`pandoc --version | head -1 | cut -d' ' -f2 | cut -d'.' -f1`; \
if [ "$PANDOC_VERSION" -eq "2" ]; then \
SMART=-smart; \
else \
SMART=--smart; \
fi \
for f in markdown/*.md; do \
FILE_NAME=`basename $f | sed 's/.md//g'`; \
echo $FILE_NAME.html; \
pandoc --standalone --include-in-header styles/chmduquesne.css \
--lua-filter=pdc-links-target-blank.lua \
--from markdown --to html \
--output output/$FILE_NAME.html $f \
--metadata pagetitle=$FILE_NAME;\
done
resume.html
for f in markdown/*.md; do \
FILE_NAME=`basename $f | sed 's/.md//g'`; \
echo $FILE_NAME.pdf; \
pandoc --standalone --template styles/chmduquesne.tex \
--from markdown --to context \
--variable papersize=A4 \
--output output/$FILE_NAME.tex $f > /dev/null; \
mtxrun --path=output --result=$FILE_NAME.pdf --script context $FILE_NAME.tex > output/context_$FILE_NAME.log 2>&1; \
done
resume.pdf
mkdir -p output
PANDOC_VERSION=`pandoc --version | head -1 | cut -d' ' -f2 | cut -d'.' -f1`; \
if [ "$PANDOC_VERSION" -eq "2" ]; then \
SMART=-smart; \
make: *** [Makefile:9: pdf] Error 127
make: *** [Makefile:9: pdf] Error 127
else \
SMART=--smart; \
fi \
for f in markdown/*.md; do \
FILE_NAME=`basename $f | sed 's/.md//g'`; \
echo $FILE_NAME.html; \
pandoc --standalone --include-in-header styles/chmduquesne.css \
--lua-filter=pdc-links-target-blank.lua \
--from markdown --to html \
--output output/$FILE_NAME.html $f \
--metadata pagetitle=$FILE_NAME;\
done
resume.html
for f in markdown/*.md; do \
FILE_NAME=`basename $f | sed 's/.md//g'`; \
echo $FILE_NAME.pdf; \
pandoc --standalone --template styles/chmduquesne.tex \
--from markdown --to context \
--variable papersize=A4 \
--output output/$FILE_NAME.tex $f > /dev/null; \
mtxrun --path=output --result=$FILE_NAME.pdf --script context $FILE_NAME.tex > output/context_$FILE_NAME.log 2>&1; \
done
resume.pdf
Thanks for reporting -- I'll try to fix this as soon as I have some spare time!
When I look into container with:
docker run -it --rm --entrypoint sh resume-make
Looks like the entry point files is getting placed into root, which has no Makefile
There is no update regarding this?!
One year has passed and even the mounting point hasn't been fixed, it just needs one second to edit the docker-compose file (Although I still get that Error 127
for PDF).
Apologies for the delay in fixing this, should be done now!
Still having issues with docker-compose up
. On Windows 11, The entrypoint.sh
can't find /home/app
EDIT 1: I had to make the following edit. I'm not sure why the entrypoint.sh
includes a cd
into a directory that hasn't been created. I guess it is my windows config and I don't have an *nix installation with an app user.
diff --git a/docker-compose.yml b/docker-compose.yml
index 29af42f..09ae346 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -7,7 +7,7 @@ services:
context: .
dockerfile: ./.docker/resume.dockerfile
container_name: resume-make
- entrypoint: /entrypoint.sh
+ entrypoint: make
image: resume-make
volumes:
- - .:/home/app/resume:z
+ - .:/data
EDIT 2: There is something going on with the line endings in the entrypoint.sh
when it is copied to the docker container. Inside the container I had to remove ^M
with vi /entrypoint.sh
then I could ./entrypoint
and I wouldn't receive the not found
error.
EDIT 3: It was the line endings on Windows. I had to run the below and I was good to go.
git config --local core.autocrlf false
git reset HEAD .
git checkout -- .
docker rm -vf (docker ps -aq)
docker image rm resume-make
docker-compose up
EDIT 4: It would be helpful for Windows folks or the like to have a .gitattributes
file in the repo a la this link.
* text=auto
*.sh text eol=lf
*.conf text eol=lf
Expected Behavior
Creates pdf and html files in output directory
Actual Behavior
Steps to reproduce the behavior
docker-compose up
OS information
Ubuntu 20.04.2