-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathdockerfile
More file actions
53 lines (40 loc) · 1.35 KB
/
dockerfile
File metadata and controls
53 lines (40 loc) · 1.35 KB
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
FROM gcc as builder
RUN apt-get update && apt-get install -y git
RUN groupadd nobody && \
useradd jsproxy -g nobody --create-home
USER jsproxy
WORKDIR /home/jsproxy
RUN cd $(mktemp -d) && \
curl -k -O https://www.openssl.org/source/openssl-1.1.1b.tar.gz && \
tar zxf openssl-* && \
curl -k -O https://ftp.exim.org/pub/pcre/pcre-8.43.tar.gz && \
tar zxf pcre-* && \
curl -k -O https://zlib.net/zlib-1.2.12.tar.gz && \
tar zxf zlib-* && \
curl -k -O https://openresty.org/download/openresty-1.15.8.1.tar.gz && \
tar zxf openresty-* && \
cd openresty-* && \
export PATH=$PATH:/sbin && \
./configure \
--with-openssl=../openssl-1.1.1b \
--with-pcre=../pcre-8.43 \
--with-zlib=../zlib-1.2.12 \
--with-http_v2_module \
--with-http_ssl_module \
--with-pcre-jit \
--prefix=$HOME/openresty && \
make && \
make install
RUN git clone --depth=1 https://github.com/EtherDream/jsproxy.git server && \
cd server && \
rm -rf www && \
git clone -b gh-pages --depth=1 https://github.com/EtherDream/jsproxy.git www
FROM ubuntu as prod
RUN groupadd nobody && \
useradd jsproxy -g nobody --create-home
USER jsproxy
COPY --from=builder /home/jsproxy /home/jsproxy
WORKDIR /home/jsproxy
EXPOSE 8443
EXPOSE 8080
CMD ./server/run.sh && while true; do sleep 1; done