forked from Piorosen/my-own-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 1.05 KB
/
Dockerfile
File metadata and controls
36 lines (29 loc) · 1.05 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
FROM ubuntu:24.04 AS builder
WORKDIR /work
RUN apt update && \
apt install -y clang-17 git cmake ninja-build \
curl zip unzip tar build-essential pkg-config
COPY vcpkg.json vcpkg.json
COPY Makefile Makefile
RUN make vcpkg
COPY . .
ENV CXX clang++-17
ENV CC clang-17
RUN mkdir build && \
cd build && \
cmake -DCMAKE_TOOLCHAIN_FILE=/work/3rdparty/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON -DSTATIC=ON \
-DCMAKE_C_COMPILER=${CC} \
-DCMAKE_CXX_COMPILER=${CXX} \
-G Ninja .. && \
ninja
RUN rm -rf /var/lib/apt/lists/*
# For deployment., so To be determine.
FROM ubuntu:24.04
LABEL org.opencontainers.image.source=https://github.com/orgs/virtual-machine-created-by-myself
LABEL org.opencontainers.image.licenses=MIT
LABEL org.opencontainers.image.authors="JooHyoung Cha"
# LABEL org.opencontainers.image.description="reproducibility test about p2809r3, by docker and llvm17"
COPY --from=builder /work/build/virtual-machine /virtual-machine
CMD [ "/virtual-machine" ]