lingua-franca
lingua-franca copied to clipboard
Dockerfile needs minor modifications to run
To get the Dockerfile to run on a simple HelloWorld I had to change the first part of the generated Dockerfile from
WORKDIR /lingua-franca/HelloDocker
RUN set -ex && apk add --no-cache gcc musl-dev cmake make
COPY . src-gen
RUN set -ex && \
mkdir bin && \
cmake -S src-gen -B bin && \
cd bin && \
make all
to
WORKDIR /lingua-franca/HelloDocker
RUN set -ex && apk add --no-cache gcc musl-dev cmake make
COPY src-gen src-gen
RUN set -ex && \
mkdir bin && \
cmake -S src-gen/HelloDocker -B bin && \
cd bin && \
make all
I.e. 2 issues.
- Dockerfile seems to assume that you are running "docker build" from within the src-gen directory.
- Dockerfile is not aware that the generated src files are put in src-gen/HelloDocker/*
Would you like to tackle this issue? This is the place where the contents of the Dockerfile you posted get generated.
Another better(?) solution would be to just change the documentation a little and specify that you must navigate into the src-gen folder to where .Dockerfile resides before executing "docker build".
See https://github.com/lf-lang/website-lingua-franca/pull/65
Looks OK to me... Any other opinions on this? @Soroosh129 or @petervdonovan?
I think it is still unclear from the doc where this src-gen
folder is. Perhaps it could link to this to clarify where the src-gen
directory would be.
Add hyperlink to that section now https://github.com/lf-lang/website-lingua-franca/pull/65