Debian Codegraph @

LspCpp/third_party/ixwebsocket/docker/Dockerfile.debian

raw
1 # Build time
2 FROM debian:buster as build
3
4 ENV DEBIAN_FRONTEND noninteractive
5 RUN apt-get update
6 RUN apt-get -y install wget
7 RUN mkdir -p /tmp/cmake
8 WORKDIR /tmp/cmake
9 RUN wget https://github.com/Kitware/CMake/releases/download/v3.14.0/cmake-3.14.0-Linux-x86_64.tar.gz
10 RUN tar zxf cmake-3.14.0-Linux-x86_64.tar.gz
11
12 RUN apt-get -y install g++
13 RUN apt-get -y install libssl-dev
14 RUN apt-get -y install libz-dev
15 RUN apt-get -y install make
16
17 COPY . .
18
19 ARG CMAKE_BIN_PATH=/tmp/cmake/cmake-3.14.0-Linux-x86_64/bin
20 ENV PATH="${CMAKE_BIN_PATH}:${PATH}"
21
22 RUN ["make"]
23
24 # Runtime
25 FROM debian:buster as runtime
26
27 ENV DEBIAN_FRONTEND noninteractive
28 RUN apt-get update
29 # Runtime
30 RUN apt-get install -y libssl1.1
31 RUN apt-get install -y ca-certificates
32 RUN ["update-ca-certificates"]
33
34 # Debugging
35 RUN apt-get install -y strace
36 RUN apt-get install -y procps
37 RUN apt-get install -y htop
38
39 RUN adduser --disabled-password --gecos '' app
40 COPY --chown=app:app --from=build /usr/local/bin/ws /usr/local/bin/ws
41 RUN chmod +x /usr/local/bin/ws
42 RUN ldd /usr/local/bin/ws
43
44 # Now run in usermode
45 USER app
46 WORKDIR /home/app
47
48 COPY --chown=app:app ws/snake/appsConfig.json .
49 COPY --chown=app:app ws/cobraMetricsSample.json .
50
51 ENTRYPOINT ["ws"]
52 CMD ["--help"]