From 947286221696d24aa06d711dfdc4636a07cb6ccf Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Wed, 7 Jul 2021 11:48:06 +0200 Subject: minimized service dependencies in Dockerfile, fixed STL parsing of files with no solidname after endsolid --- service/Dockerfile | 3 ++- service/src/stlfile.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'service') diff --git a/service/Dockerfile b/service/Dockerfile index c932e66..66952dc 100644 --- a/service/Dockerfile +++ b/service/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:18.04 -RUN apt update && apt install -y --no-install-recommends socat build-essential +RUN apt update && apt install -y --no-install-recommends socat gcc make libc6-dev libc6 libc-dev-bin RUN addgroup --system service RUN adduser --system --ingroup service --uid 1000 service @@ -17,6 +17,7 @@ WORKDIR /service/ RUN make clean && make EXPOSE 9000 + ENV RESULTDIR=/data/uploads ENTRYPOINT ["/entrypoint.sh"] diff --git a/service/src/stlfile.c b/service/src/stlfile.c index bddb24f..7c067f3 100644 --- a/service/src/stlfile.c +++ b/service/src/stlfile.c @@ -83,7 +83,7 @@ consume_arg(char **start, char **end) if (!*start) return NULL; for (c = *start; *c && !isws(*c); c++); tmp = *start; - *start = c + 1; + *start = c + (*c ? 1 : 0); *end = c; return tmp; } -- cgit v1.2.3-71-gd317