aboutsummaryrefslogtreecommitdiffstats
path: root/service
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2021-07-07 11:48:06 +0200
committerLouis Burda <quent.burda@gmail.com>2021-07-07 11:48:06 +0200
commit947286221696d24aa06d711dfdc4636a07cb6ccf (patch)
tree2d9d7661d3be0e67c6817c97ed2f59e9cc95f935 /service
parentaf37f8075b0c1225f5e49339565bb6738c4d1f20 (diff)
downloadenowars5-service-stldoctor-947286221696d24aa06d711dfdc4636a07cb6ccf.tar.gz
enowars5-service-stldoctor-947286221696d24aa06d711dfdc4636a07cb6ccf.zip
minimized service dependencies in Dockerfile, fixed STL parsing of files with no solidname after endsolid
Diffstat (limited to 'service')
-rw-r--r--service/Dockerfile3
-rw-r--r--service/src/stlfile.c2
2 files changed, 3 insertions, 2 deletions
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;
}