Skip to content

Commit 7929d26

Browse files
Dorian Eikenbergrageagainsthepc
authored andcommitted
Prepare build image for vcpkg
1 parent f221b4b commit 7929d26

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

build/Dockerfile

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
FROM ubuntu:lunar
1+
FROM ubuntu:latest
22

3-
ARG LLVM_MAJOR=16
3+
ARG LLVM_MAJOR=18
44
ENV LLVM_MAJOR=${LLVM_MAJOR}
55

66
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
@@ -16,10 +16,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
1616
libc++-${LLVM_MAJOR}-dev \
1717
libglib2.0-dev \
1818
libjson-c-dev \
19-
libtclap-dev \
2019
libtool \
2120
libvirt-dev \
22-
libyara-dev \
2321
libxen-dev \
2422
lld-${LLVM_MAJOR} \
2523
make \
@@ -29,6 +27,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -q \
2927
sudo \
3028
unzip \
3129
wget \
30+
zip \
3231
&& rm -rf /var/lib/apt/lists/*
3332

3433
RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_MAJOR} 100 \
@@ -45,15 +44,20 @@ RUN git clone https://github.com/bitdefender/libkvmi.git \
4544
&& cd - \
4645
&& rm -rf libkvmi
4746

47+
RUN cd /usr/local/share/ && \
48+
git clone https://github.com/microsoft/vcpkg.git && \
49+
cd vcpkg && \
50+
./bootstrap-vcpkg.sh --disableMetrics && \
51+
mv vcpkg /usr/local/bin/
52+
ENV VCPKG_ROOT=/usr/local/share/vcpkg
53+
4854
COPY rust_exec.sh /root/rust_exec.sh
49-
SHELL ["/bin/bash", "-c"]
50-
RUN RUSTUP_HOME=/opt/rust \
51-
&& export RUSTUP_HOME \
52-
&& CARGO_HOME=/opt/rust \
53-
&& export CARGO_HOME \
54-
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path \
55-
&& cargo_binaries=($(ls ${RUSTUP_HOME}/bin/)); \
55+
RUN export RUSTUP_HOME=/opt/rust && \
56+
export CARGO_HOME=/opt/rust && \
57+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && \
58+
bash -c \
59+
'cargo_binaries=($(ls ${RUSTUP_HOME}/bin/)); \
5660
for i in "${cargo_binaries[@]}"; do \
5761
cp /root/rust_exec.sh "/usr/local/bin/$i" && chmod +x "/usr/local/bin/$i"; \
58-
done \
59-
&& rm -f /root/rust_exec.sh
62+
done' && \
63+
rm -f /root/rust_exec.sh

0 commit comments

Comments
 (0)