forked from centrifugal/centrifugo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
32 lines (20 loc) · 986 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
FROM centos:7
ENV VERSION 1.8.0
ENV CENTRIFUGO_SHA256 ed68b83a7d0a1df1355fceb594a0786a3b0c25b5ed997edf8c55c5f59f13d472
ENV DOWNLOAD https://github.com/centrifugal/centrifugo/releases/download/v$VERSION/centrifugo-$VERSION-linux-amd64.zip
RUN curl -sSL "$DOWNLOAD" -o /tmp/centrifugo.zip && \
echo "${CENTRIFUGO_SHA256} /tmp/centrifugo.zip" | sha256sum -c - && \
yum install -y unzip && \
unzip -jo /tmp/centrifugo.zip -d /tmp/ && \
yum remove -y unzip && \
mv /tmp/centrifugo /usr/bin/centrifugo && \
rm -f /tmp/centrifugo.zip && \
echo "centrifugo - nofile 65536" >> /etc/security/limits.d/centrifugo.nofiles.conf
RUN groupadd -r centrifugo && useradd -r -g centrifugo centrifugo
RUN mkdir /centrifugo && chown centrifugo:centrifugo /centrifugo && \
mkdir /var/log/centrifugo && chown centrifugo:centrifugo /var/log/centrifugo
VOLUME ["/centrifugo", "/var/log/centrifugo"]
WORKDIR /centrifugo
USER centrifugo
CMD ["centrifugo"]
EXPOSE 8000