-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patharataga-ubuntu1804-gcc10-local.Dockerfile
55 lines (43 loc) · 1.53 KB
/
arataga-ubuntu1804-gcc10-local.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
FROM ubuntu:18.04 as arataga-build
# Prepare build environment
RUN apt-get update
RUN apt-get -qq -y install software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && \
apt-get -qq -y install g++-10
RUN apt-get -qq -y install ruby curl pkg-config libtool
RUN gem install Mxx_ru
RUN mkdir /tmp/arataga-build
COPY arataga /tmp/arataga-build/arataga
COPY *.rb /tmp/arataga-build/
RUN echo "*** Building arataga ***" \
&& cd /tmp/arataga-build \
&& mxxruexternals \
&& MXX_RU_CPP_TOOLSET="gcc_linux cpp_compiler_name=g++-10 c_compiler_name=gcc-10 linker_name=g++-10" ruby build.rb --mxx-cpp-release \
&& cp target/release/bin/arataga /root \
&& cd /root \
&& rm -rf /tmp/arataga-build
FROM ubuntu:18.04 as arataga
RUN apt-get update
RUN apt-get -qq -y install software-properties-common
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update && \
apt-get -qq -y install g++-10
COPY --from=arataga-build /root/arataga /root
RUN mkdir /root/cfg
RUN echo "log_level info\n\
nserver 8.8.8.8, 8.8.4.4\n\
timeout.protocol_detection 15s\n\
timeout.http.headers_complete 10s\n\
acl auto, port=5001, in_ip=0.0.0.0, out_ip=0.0.0.0" > /root/cfg/local-config.cfg
RUN echo "0.0.0.0 5001 user 12345 = 0 0 0 1" > /root/cfg/local-user-list.cfg
EXPOSE 8088
EXPOSE 5001
WORKDIR /root
# Start arataga
CMD ~/arataga --no-daemonize \
--admin-http-ip=0.0.0.0 --admin-http-port=8088 \
--admin-token=arataga-admin-entry \
--local-config-path=/root/cfg \
--log-target=stdout \
--log-level=debug