|
14 | 14 | # docker image push chronolaw/cpp_study |
15 | 15 | # docker image pull chronolaw/cpp_study |
16 | 16 |
|
17 | | -ARG SRC_IMAGE="chronolaw/http_study" |
| 17 | +ARG SRC_IMAGE="gcc:7" |
18 | 18 |
|
19 | 19 | FROM ${SRC_IMAGE} |
20 | 20 |
|
21 | 21 | #LABEL version="2020-09" |
| 22 | + |
| 23 | +# gcc-multilib g++-multilib |
| 24 | +# linux-tools-common |
22 | 25 | # linux-tools-4.4.0-31-generic linux-cloud-tools-4.4.0-31-generic linux-tools-generic linux-cloud-tools-generic |
23 | | -# python3-dev python3-pip |
24 | | -# google-perftools libgoogle-perftools-dev |
25 | 26 | # graphviz |
26 | | -# && pip3 install pybind11 |
27 | 27 | # && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y |
| 28 | +# && mkdir -p cpp_study/common \ |
| 29 | + |
| 30 | +ARG CPR_VERSION="1.5.1" |
| 31 | +ARG LUAJIT_VERSION="2.1-20200102" |
| 32 | +ARG LUABRIDAGE_VERSION="2.6" |
28 | 33 |
|
29 | 34 | RUN DEBIAN_FRONTEND=noninteractive apt-get update \ |
30 | | - && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
31 | | - gcc-multilib g++-multilib \ |
32 | | - cmake pstack strace linux-tools-common \ |
| 35 | + && DEBIAN_FRONTEND=noninteractive apt-get install -y \ |
| 36 | + vim cmake pstack strace \ |
33 | 37 | libmsgpack-dev protobuf-compiler libprotobuf-dev \ |
34 | 38 | libcurl4-openssl-dev libzmq3-dev \ |
| 39 | + python3-dev python3-pip \ |
| 40 | + google-perftools libgoogle-perftools-dev \ |
| 41 | + && pip3 install pybind11 \ |
35 | 42 | && cd \ |
36 | 43 | && git clone https://github.com/chronolaw/cpp_study \ |
37 | 44 | && mkdir github \ |
38 | 45 | && cd github \ |
39 | 46 | && curl -fsL https://github.com/nlohmann/json/releases/download/v3.9.1/json.hpp -o json.hpp \ |
40 | | - && cp json.hpp ~/cpp_study/common \ |
41 | | - && curl -fsL https://github.com/whoshuu/cpr/archive/1.4.0.tar.gz -o cpr.tgz \ |
| 47 | + && ln -s json.hpp ~/cpp_study/common/json.hpp \ |
| 48 | + && curl -fsL https://github.com/whoshuu/cpr/archive/${CPR_VERSION}.tar.gz -o cpr.tgz \ |
42 | 49 | && tar xfz cpr.tgz \ |
43 | | - && cd cpr-1.4.0 \ |
| 50 | + && cd cpr-${CPR_VERSION} \ |
44 | 51 | && cmake . -DUSE_SYSTEM_CURL=ON -DBUILD_CPR_TESTS=OFF \ |
45 | 52 | && make && make install \ |
46 | 53 | && cd .. \ |
47 | | - && curl -fsL https://github.com/openresty/luajit2/archive/v2.1-20200102.tar.gz -o luajit.tgz \ |
| 54 | + && curl -fsL https://github.com/openresty/luajit2/archive/v${LUAJIT_VERSION}.tar.gz -o luajit.tgz \ |
48 | 55 | && tar xfz luajit.tgz \ |
49 | | - && cd luajit2-2.1-20200102 \ |
| 56 | + && cd luajit2-${LUAJIT_VERSION} \ |
50 | 57 | && make && make install \ |
51 | | - && curl -fsL https://github.com/vinniefalco/LuaBridge/archive/2.6.tar.gz -o LuaBridge.tgz \ |
52 | 58 | && cd .. \ |
53 | | - && git clone https://github.com/brendangregg/FlameGraph.git |
| 59 | + && curl -fsL https://github.com/vinniefalco/LuaBridge/archive/${LUABRIDAGE_VERSION}.tar.gz -o LuaBridge.tgz \ |
| 60 | + && tar xfz LuaBridge.tgz \ |
| 61 | + && cd LuaBridge-${LUABRIDAGE_VERSION} \ |
| 62 | + && ln -s Source/LuaBridge/ ~/cpp_study/common/ \ |
| 63 | + && cd .. \ |
| 64 | + && git clone https://github.com/brendangregg/FlameGraph.git \ |
| 65 | + && rm *.tgz \ |
| 66 | + && echo "alias ll='ls -l'" >> ~/.bashrc \ |
| 67 | + && echo "alias l='ls -lh'" >> ~/.bashrc \ |
| 68 | + && echo "alias vi='vim'" >> ~/.bashrc \ |
| 69 | + && echo "set -o vi" >> ~/.bashrc |
54 | 70 |
|
55 | 71 |
|
56 | 72 | CMD ["/bin/bash"] |
|
0 commit comments