-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
64 lines (56 loc) · 1.79 KB
/
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
55
56
57
58
59
60
61
62
63
64
FROM ubuntu:24.04 AS relay
ENV DEBIAN_FRONTEND noninteractive
ARG GCC=gcc-14
ARG GPP=g++-14
ARG CMAKE_PKG_URL=https://cmake.org/files/v3.30/cmake-3.30.0-rc4-linux-x86_64.sh
ARG NINJA_PKG_URL=http://archive.ubuntu.com/ubuntu/ubuntu/pool/universe/n/ninja-build/ninja-build_1.12.1-1_amd64.deb
ARG MESON_PKG_URL=http://archive.ubuntu.com/ubuntu/pool/universe/m/meson/meson_1.4.1-1ubuntu1_all.deb
# If use openssl-cmake, you must use an older version of cmake to build.
#ARG CMAKE_PKG_URL=https://cmake.org/files/v3.18/cmake-3.18.4-Linux-x86_64.sh
# Install related packages
RUN \
--mount=type=cache,target=/var/lib/apt/lists \
--mount=type=cache,target=/var/cache/apt \
apt-get -y update && \
apt-get -y install --no-install-recommends \
make \
wget \
zip \
unzip \
git \
libc6-dev \
dpkg-dev \
ca-certificates \
libssl-dev \
openssl \
libwebsockets-dev \
${GCC} \
${GPP} \
python3 \
python3-pkg-resources \
python3-setuptools \
librocksdb-dev \
&& \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/${GCC} 99 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/${GPP} 99 && \
update-alternatives --auto gcc && \
update-alternatives --auto g++ && \
wget ${CMAKE_PKG_URL} && \
wget ${NINJA_PKG_URL} && \
wget ${MESON_PKG_URL} && \
sh $(basename ${CMAKE_PKG_URL}) --prefix=/usr/local --exclude-subdir && \
dpkg -i $(basename ${NINJA_PKG_URL}) && \
dpkg -i $(basename ${MESON_PKG_URL}) && \
rm $(basename ${CMAKE_PKG_URL}) && \
rm $(basename ${NINJA_PKG_URL}) && \
rm $(basename ${MESON_PKG_URL})
# Copy source files
COPY ./src /app/src
COPY ./meson /app/meson
COPY ./Makefile /app/Makefile
WORKDIR /app
# Build
RUN make setup && make build
# Start shootingstr
RUN echo "start!"
CMD ["build/shootingstr"]