-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
88 lines (69 loc) · 2.34 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM amd64/ubuntu:24.10 AS mapf-base
WORKDIR /tmp
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update -q \
&& apt install -yq --no-install-recommends \
zsh \
&& rm -rf /var/lib/apt/lists/* \
&& apt clean
ENV SHELL /bin/zsh
SHELL ["/bin/zsh", "-c"]
# Install COMMON
RUN apt update -q \
&& apt install -yq --no-install-recommends \
ca-certificates \
curl \
htop \
git \
gpg \
neovim \
ssh \
software-properties-common \
sudo \
tar \
tmux \
wget \
&& rm -rf /var/lib/apt/lists/* \
&& apt clean
RUN sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" -x
# Install LLVM
ENV CLANG_VERSION=19
ENV CXX="clang++-${CLANG_VERSION}"
ENV CC="clang-${CLANG_VERSION}"
ENV BAZEL_CXXOPTS="-std=c++2c"
RUN echo "Build info:" \
&& echo " CC=${CC}" \
&& echo " CXX=${CXX}"
RUN wget https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
&& sudo ./llvm.sh ${CLANG_VERSION} \
&& rm -rf /tmp/*
RUN apt-get update -q \
&& apt-get install -yq --no-install-recommends \
clang-${CLANG_VERSION} \
clang-format-${CLANG_VERSION} \
clang-tidy-${CLANG_VERSION} \
lldb-${CLANG_VERSION} \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
RUN printf "export CC='${CC}'\n" >> /root/.zshrc \
&& printf "export CXX='${CXX}'\n" >> /root/.zshrc \
&& printf "export BAZEL_CXXOPTS='${BAZEL_CXXOPTS}'\n" >> /root/.zshrc \
&& ln -sf ${CC} /usr/bin/clang \
&& ln -sf ${CXX} /usr/bin/clang++ \
&& ln -sf /usr/bin/clang-format-${CLANG_VERSION} /usr/bin/clang-format
# Install Bazel
ARG TARGETARCH
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.23.0/bazelisk-linux-${TARGETARCH} \
&& chmod +x bazelisk-linux-${TARGETARCH} \
&& mv bazelisk-linux-${TARGETARCH} /usr/bin/bazel
RUN wget https://github.com/bazelbuild/buildtools/releases/download/v7.3.1/buildifier-linux-${TARGETARCH} \
&& chmod +x buildifier-linux-${TARGETARCH} \
&& mv buildifier-linux-${TARGETARCH} /usr/bin/buildifier
# Install MCAP CLI
RUN wget https://github.com/foxglove/mcap/releases/download/releases%2Fmcap-cli%2Fv0.0.50/mcap-linux-${TARGETARCH} \
&& chmod +x mcap-linux-${TARGETARCH} \
&& mv mcap-linux-${TARGETARCH} /usr/bin/mcap
WORKDIR /mapf
ENTRYPOINT ["/bin/zsh", "-lc"]
CMD ["trap : TERM INT; sleep infinity & wait"]