2021-02-27 13:15:52 +01:00
|
|
|
FROM node:15.8.0-buster-slim
|
2021-03-28 21:01:46 +02:00
|
|
|
|
2021-03-28 21:03:08 +02:00
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
|
2021-02-27 13:15:52 +01:00
|
|
|
RUN dpkg-reconfigure -p critical dash
|
|
|
|
RUN for i in $(seq 1001 1500); do \
|
2021-02-22 11:15:04 +01:00
|
|
|
groupadd -g $i runner$i && \
|
|
|
|
useradd -M runner$i -g $i -u $i ; \
|
|
|
|
done
|
2021-03-13 11:09:13 +01:00
|
|
|
RUN apt-get update && \
|
2021-03-28 21:01:46 +02:00
|
|
|
apt-get install -y libxml2 gnupg tar coreutils util-linux libc6-dev \
|
|
|
|
binutils build-essential locales libpcre3-dev libevent-dev libgmp3-dev \
|
2021-04-07 02:31:30 +02:00
|
|
|
libncurses6 libncurses5 libedit-dev libseccomp-dev && \
|
2021-03-13 11:09:13 +01:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
2021-02-20 15:13:56 +01:00
|
|
|
|
2021-03-16 16:51:45 +01:00
|
|
|
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
|
|
|
|
|
2021-02-20 15:13:56 +01:00
|
|
|
ENV NODE_ENV=production
|
2021-03-28 21:03:08 +02:00
|
|
|
|
2021-02-20 15:13:56 +01:00
|
|
|
WORKDIR /piston_api
|
2021-03-29 10:33:49 +02:00
|
|
|
COPY ["package.json", "package-lock.json", "./"]
|
|
|
|
RUN npm i
|
2021-02-20 15:13:56 +01:00
|
|
|
COPY ./src ./src
|
|
|
|
|
2021-04-07 02:31:30 +02:00
|
|
|
RUN make -C ./src/nosocket/ all && make -C ./src/nosocket/ install
|
|
|
|
|
2021-02-20 15:13:56 +01:00
|
|
|
CMD [ "node", "src", "-m", "-c", "/piston/config.yaml"]
|
2021-03-28 21:01:46 +02:00
|
|
|
EXPOSE 2000/tcp
|