forked from umple/umple
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (22 loc) · 777 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
25
26
27
28
29
30
31
# This dockerfile sets up an image to run node.js, which will
# act as a server on port 4400 to prepare to execute code
# The actual execution of the code is done in a docker-in-docker within this
# For that, see the Dockerfile in the javarunner directory
FROM --platform=linux/amd64 alpine
RUN apk add --update nodejs npm
RUN apk add docker
RUN apk add sudo
RUN addgroup nodeuser
RUN adduser -D -H -S nodeuser -G nodeuser \
&& echo "nodeuser ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/nodeuser \
&& chmod 0440 /etc/sudoers.d/nodeuser
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
# Bundle app source
COPY . .
EXPOSE 4400
RUN chown -R nodeuser:nodeuser /usr/src/app
RUN chown -R nodeuser:nodeuser /home
USER nodeuser
CMD [ "npm", "start" ]