lingua-franca icon indicating copy to clipboard operation
lingua-franca copied to clipboard

Dockerfile needs minor modifications to run

Open erlingrj opened this issue 2 years ago • 6 comments

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.

  1. Dockerfile seems to assume that you are running "docker build" from within the src-gen directory.
  2. Dockerfile is not aware that the generated src files are put in src-gen/HelloDocker/*

erlingrj avatar May 13 '22 06:05 erlingrj

Would you like to tackle this issue? This is the place where the contents of the Dockerfile you posted get generated.

Soroosh129 avatar May 20 '22 20:05 Soroosh129

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".

erlingrj avatar May 23 '22 18:05 erlingrj

See https://github.com/lf-lang/website-lingua-franca/pull/65

erlingrj avatar May 23 '22 18:05 erlingrj

Looks OK to me... Any other opinions on this? @Soroosh129 or @petervdonovan?

lhstrh avatar May 23 '22 19:05 lhstrh

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.

Soroosh129 avatar May 23 '22 20:05 Soroosh129

Add hyperlink to that section now https://github.com/lf-lang/website-lingua-franca/pull/65

erlingrj avatar May 24 '22 09:05 erlingrj