-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
66 lines (50 loc) · 1.74 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM node:iron-slim
ENV VERSION 1.0.0
LABEL name="ArunaCore"
LABEL version=$VERSION
LABEL mantainer="LoboMetalurgico <[email protected]>"
LABEL org.opencontainers.image.source="https://github.com/ArunaBot/ArunaCore-Docker/"
LABEL org.opencontainers.image.version=$VERSION
LABEL org.opencontainers.image.VENDOR="LoboMetalurgico"
LABEL org.opencontainers.image.title="ArunaCore"
LABEL org.opencontainers.image.description="ArunaCore is an open source websocket server made with nodejs for intercomunication between applications."
LABEL org.opencontainers.image.licenses="GPL-3.0"
HEALTHCHECK --interval=30s --timeout=5s CMD curl -f http://localhost:$PORT/healthcheck || exit 1
# Add user early to get a consistent userid
# - the root group so it can run with any uid
# - the tty group for /dev/std* access
RUN \
useradd --shell /bin/sh --user-group arunacore --groups root,tty \
&& mkdir -p /home/arunacore/.ssh \
&& touch /home/arunacore/.ssh/authorized_keys \
&& chown -R arunacore:arunacore /home/arunacore \
&& chmod 700 /home/arunacore/.ssh
# Home directory
ENV HOME=/home/arunacore
RUN \
apt-get update && \
apt-get install --no-install-recommends -y \
ca-certificates \
unzip \
curl
WORKDIR ${HOME}
# Create ArunaCore directory
RUN mkdir ArunaCore
# Set the working directory to ArunaCore
WORKDIR ${HOME}/ArunaCore
# Download ArunaCore
RUN curl -L https://github.com/ArunaBot/ArunaCore/releases/latest/download/arunacore.zip -o arunacore.zip
# Unzip ArunaCore
RUN unzip arunacore.zip
# Delete ArunaCore.zip
RUN rm arunacore.zip
# Set NODE_ENV to production
ENV NODE_ENV=production
# Upgrade NPM
RUN npm install -g npm
# Setup ArunaCore
RUN npm ci
# Expose the port
EXPOSE 3000/tcp
# Run ArunaCore
CMD ["npm", "start"]