forked from kalviumcommunity/compilerd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
24 lines (18 loc) · 796 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM docker.io/library/node:16.17.0-alpine3.16
ENV PYTHONUNBUFFERED=1
RUN set -ex && \
apk add --no-cache gcc g++ musl-dev python3 openjdk17 iptables ip6tables
RUN set -ex && \
rm -f /usr/libexec/gcc/x86_64-alpine-linux-musl/6.4.0/cc1obj && \
rm -f /usr/libexec/gcc/x86_64-alpine-linux-musl/6.4.0/lto1 && \
rm -f /usr/libexec/gcc/x86_64-alpine-linux-musl/6.4.0/lto-wrapper && \
rm -f /usr/bin/x86_64-alpine-linux-musl-gcj
RUN ln -sf python3 /usr/bin/python
ADD . /usr/bin/
ADD start.sh /usr/bin/
RUN npm --prefix /usr/bin/ install
EXPOSE 8080
# add a dummy user that will run the server, hence sandboxing the rest of the container
RUN addgroup -S -g 2000 runner && adduser -S -D -u 2000 -s /sbin/nologin -h /tmp -G runner runner
# USER runner
CMD sh /usr/bin/start.sh