Skip to content

Commit 0688ab3

Browse files
committed
Initial (possibly broken) work on the Docker build
1 parent 9cfdb15 commit 0688ab3

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

‎Dockerfile‎

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
FROM ubuntu:latest
2+
3+
RUN apt-get -y update
4+
RUN apt-get -y install \
5+
clang++-22 \
6+
clang-22 \
7+
cmake \
8+
curl \
9+
libclang-22-dev \
10+
libcurl4-openssl-dev \
11+
libedit-dev \
12+
libzstd-dev \
13+
ninja-build \
14+
zlib1g-dev \
15+
rustup
16+
17+
#RUN useradd -m workuser
18+
#RUN chown -R workuser:workuser /home/workuser
19+
#RUN mkdir -p /opt/workdir /home/workuser/.rustup/downloads
20+
#RUN chown workuser:workuser /opt/workdir
21+
#RUN chmod u+rw /opt/workdir /home/workuser
22+
#
23+
#USER workuser
24+
#
25+
#RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
26+
27+
RUN rustup toolchain install "1.96.1-x86_64-unknown-linux-gnu"
28+
RUN rustup toolchain install "nightly-2026-06-30-x86_64-unknown-linux-gnu"
29+
RUN rustup component add --toolchain "nightly-2026-06-30-x86_64-unknown-linux-gnu" rust-src rustc-dev llvm-tools-preview
30+
RUN rustup component add --toolchain "1.96.1-x86_64-unknown-linux-gnu" rust-src rustc-dev llvm-tools-preview
31+
32+
ENV PATH="/root/.cargo/bin:${PATH}"
33+
ENV RUST_BACKTRACE=full
34+
35+
WORKDIR /opt/workdir
36+
37+
CMD cmake \
38+
-G Ninja \
39+
-B target/container/ubuntu/release \
40+
-D CMAKE_C_COMPILER="$(which clang-22)" \
41+
-D CMAKE_CXX_COMPILER="$(which clang++-22)" \
42+
.; \
43+
cmake --build target/container/ubuntu/release -j$(nproc)

‎compose.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
services:
2+
build:
3+
image: cpp2rust/local-build:ubuntu
4+
build:
5+
context: .
6+
volumes:
7+
- "$PWD:/opt/workdir"
8+
dns: 1.1.1.1
9+
cap_add:
10+
- NET_ADMIN
11+

0 commit comments

Comments
 (0)