-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
77 lines (69 loc) · 2.24 KB
/
Copy pathDockerfile
File metadata and controls
77 lines (69 loc) · 2.24 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM debian:12-slim
ARG BOOST_VERSION=1.85.0
ARG CMAKE_VERSION=3.27.7
ARG NUM_JOBS=32
ENV DEBIAN_FRONTEND noninteractive
# Install package dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
software-properties-common \
autoconf \
automake \
libtool \
pkg-config \
ca-certificates \
libssl-dev \
wget \
git \
curl \
locales \
locales-all \
vim \
gdb \
valgrind \
libgoogle-glog-dev && \
apt-get clean
# System locale
# Important for UTF-8
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Install CMake
RUN cd /tmp && \
wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}.tar.gz && \
tar xzf cmake-${CMAKE_VERSION}.tar.gz && \
cd cmake-${CMAKE_VERSION} && \
./bootstrap && \
make -j${NUM_JOBS} && \
make install && \
rm -rf /tmp/*
# Install Boost
# https://www.boost.org/doc/libs/1_80_0/more/getting_started/unix-variants.html
RUN cd /tmp && \
BOOST_VERSION_MOD=$(echo $BOOST_VERSION | tr . _) && \
# wget https://boostorg.jfrog.io/artifactory/main/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION_MOD}.tar.bz2 && \
wget https://github.com/boostorg/boost/releases/download/boost-${BOOST_VERSION}/boost-${BOOST_VERSION}-cmake.tar.xz && \
tar -xavf boost-${BOOST_VERSION}-cmake.tar.xz && \
cd boost-${BOOST_VERSION} && \
./bootstrap.sh --prefix=/usr/local && \
./b2 install && \
rm -rf /tmp/*
# Install libevent
RUN cd /tmp && \
wget "https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz" && \
tar -xzvf libevent-2.1.12-stable.tar.gz && \
cd libevent-2.1.12-stable && \
mkdir build && cd build && \
cmake .. && \
make -j${NUM_JOBS} && \
make install && \
rm -rf /tmp/*
RUN apt-get install -y --no-install-recommends \
ssh && \
apt-get clean && \
mkdir -p /root/.ssh && \
chmod 700 /root/.ssh && \
touch /root/.ssh/authorized_keys && \
echo "#PasswordAuthentication no" >> /etc/ssh/sshd_config && \
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config