-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile-ubuntu
126 lines (113 loc) · 3.5 KB
/
Dockerfile-ubuntu
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#######################################################################
##- Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved.
# - lcr licensed under the Mulan PSL v2.
# - You can use this software according to the terms and conditions of the Mulan PSL v2.
# - You may obtain a copy of Mulan PSL v2 at:
# - http://license.coscl.org.cn/MulanPSL2
# - THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
# - IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
# - PURPOSE.
# - See the Mulan PSL v2 for more details.
##- @Description: prepare compile container environment
##- @Author: wujing
##- @Create: 2022-03-25
#######################################################################
# This file describes the isulad compile container image.
#
# Usage:
#
# docker build --build-arg http_proxy=YOUR_HTTP_PROXY_IF_NEEDED \
# --build-arg https_proxy=YOUR_HTTPS_PROXY_IF_NEEDED \
# -t YOUR_IMAGE_NAME -f ./Dockerfile .
FROM ubuntu:lunar
MAINTAINER WuJing <wujing50@huawei.com>
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install dependency package
RUN apt update -y && apt upgrade -y && \
apt install -y automake \
autoconf \
libtool \
make \
libcap-dev \
libxslt-dev \
graphviz \
docbook2x \
libselinux-dev \
libseccomp-dev \
libyajl-dev \
git \
dnsmasq \
libcgroup-dev \
rsync \
iptables \
iproute2 \
net-tools \
unzip \
tar \
wget \
cppcheck \
python3 \
python3-pip \
libdevmapper-dev \
xz-utils \
libtar-dev \
libcurl4-openssl-dev \
zlib1g-dev \
openssl \
gcc \
g++ \
libsqlite3-dev \
libgpgme-dev \
expect \
libsystemd-dev \
bc \
locales \
language-pack-en \
curl \
cmake \
libprotobuf-dev \
libgrpc-dev \
libgrpc++-dev \
protobuf-compiler-grpc \
libevent-dev \
libwebsockets-dev \
libgmock-dev \
libgtest-dev \
libarchive-dev \
patch \
tcpdump
RUN apt install -y ninja-build meson
RUN apt install -y libncurses-dev && apt autoremove -y
RUN echo "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" >> /etc/bashrc && \
echo "export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:$LD_LIBRARY_PATH" >> /etc/bashrc && \
echo "/usr/lib" >> /etc/ld.so.conf && \
echo "/usr/local/lib" >> /etc/ld.so.conf
# disalbe sslverify
RUN git config --global http.sslverify false
# install rust
# RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# configure rust
# RUN echo "[source.crates-io]" >> ${HOME}/.cargo/config && \
# echo "[source.local-registry]" >> ${HOME}/.cargo/config && \
# echo "directory = \"vendor\"" >> ${HOME}/.cargo/config
# install libevhtp
RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \
set -x && \
cd ~ && \
git clone https://gitee.com/src-openeuler/libevhtp.git && \
cd libevhtp && \
git checkout -b openEuler-20.03-LTS-tag openEuler-20.03-LTS-tag && \
tar -xzvf libevhtp-1.2.16.tar.gz && \
cd libevhtp-1.2.16 && \
patch -p1 -F1 -s < ../0001-support-dynamic-threads.patch && \
patch -p1 -F1 -s < ../0002-close-openssl.patch && \
rm -rf build && \
mkdir build && \
cd build && \
cmake -D EVHTP_BUILD_SHARED=on -D EVHTP_DISABLE_SSL=on ../ && \
make -j $(nproc) && \
make install && \
ldconfig
CMD ["/bin/bash"]
WORKDIR /root