-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
58 lines (49 loc) · 1.5 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
# Based on trusted builds
FROM debian:stable
# Upgrade to the latest packages
RUN apt-get update
RUN apt-get upgrade -y
# Install build chain tools
RUN apt-get install -y git wget
# Install Redis
RUN \
cd /tmp && \
wget http://download.redis.io/redis-stable.tar.gz && \
tar xvzf redis-stable.tar.gz && \
cd redis-stable && \
make && \
make install && \
cp -f src/redis-sentinel /usr/local/bin && \
mkdir -p /etc/redis && \
cp -f *.conf /etc/redis && \
rm -rf /tmp/redis-stable* && \
sed -i 's/^\(bind .*\)$/# \1/' /etc/redis/redis.conf && \
sed -i 's/^\(daemonize .*\)$/# \1/' /etc/redis/redis.conf && \
sed -i 's/^\(dir .*\)$/# \1\ndir \/opt/pssst/' /etc/redis/redis.conf && \
sed -i 's/^\(logfile .*\)$/# \1/' /etc/redis/redis.conf
# Install Node.js
RUN \
cd /tmp && \
wget http://nodejs.org/dist/node-latest.tar.gz && \
tar xvzf node-latest.tar.gz && \
rm -f node-latest.tar.gz && \
cd node-v* && \
./configure && \
CXX="g++ -Wno-unused-local-typedefs" make && \
CXX="g++ -Wno-unused-local-typedefs" make install && \
cd /tmp && \
rm -rf /tmp/node-v* && \
PROFILE="/root/.bash_profile" && \
echo '\n# Node.js\nexport PATH="node_modules/.bin:$PATH"' >> $PROFILE
# Define mountable directories
VOLUME ["/opt/pssst"]
# Define working directory
WORKDIR /opt/pssst
# Install Pssst
RUN \
git clone https://github.com/cuhsat/pssst . && \
npm install
# Expose ports
EXPOSE 62221
# Define default command
CMD ["redis-server", "/etc/redis/redis.conf", "&", "npm", "start"]