Get cadquery and openscad working with more reuse on the backend

This commit is contained in:
Kurt Hutten
2021-04-23 16:24:51 +10:00
parent 9cf02980cc
commit 80868ba483
10 changed files with 66 additions and 444 deletions

View File

@@ -11,7 +11,7 @@ RUN apt-get install -y -qq openscad
RUN apt-get install -y curl
# install node14, see comment at the to of node14source_setup.sh
ADD node14source_setup.sh /nodesource_setup.sh
ADD common/node14source_setup.sh /nodesource_setup.sh
RUN ["chmod", "+x", "/nodesource_setup.sh"]
RUN bash nodesource_setup.sh
RUN apt-get install -y nodejs
@@ -29,16 +29,17 @@ RUN apt-get update && \
# Add the lambda emulator for local dev, (see entrypoint.sh for where it's used),
# I have the file locally (gitignored) to speed up build times (as it downloads everytime),
# but you can use the http version of the below ADD command or download it yourself from that url.
ADD aws-lambda-rie /usr/local/bin/aws-lambda-rie
ADD common/aws-lambda-rie /usr/local/bin/aws-lambda-rie
# ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/download/v1.0/aws-lambda-rie /usr/local/bin/aws-lambda-rie
RUN ["chmod", "+x", "/usr/local/bin/aws-lambda-rie"]
WORKDIR /var/task/
COPY package*.json /var/task/
COPY openscad/package*.json /var/task/
RUN npm install
COPY *.js /var/task/
COPY entrypoint.sh /entrypoint.sh
COPY openscad/*.js /var/task/
COPY common/*.js /var/common/
COPY common/entrypoint.sh /entrypoint.sh
RUN ["chmod", "+x", "/entrypoint.sh"]
ENTRYPOINT ["sh", "/entrypoint.sh"]