-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.Dockerfile
26 lines (21 loc) · 907 Bytes
/
build.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
# Now we setup the environment for using the cross-compiler
FROM valios/vali-toolchain:v1.11
# Build configuration arguments
# CROSS_PATH must match what is set in the toolchain image
ARG CROSS_PATH=/usr/workspace/toolchain-out
ARG ARCH
# Setup required environmental variables
ENV CROSS=$CROSS_PATH
ENV VALI_INSTALL_DIR=/usr/workspace
ENV VALI_ARCH=$ARCH
ENV DEBIAN_FRONTEND=noninteractive
ENV PATH="/root/.dotnet:${PATH}"
# Set the directory
WORKDIR /usr/workspace/vali
# Copy all repository files to image
COPY . .
# Build the operating system
RUN sed -i 's/\r$//' ./tools/depends.sh && chmod +x ./tools/depends.sh && chmod +x ./tools/dotnet-install.sh && \
./tools/depends.sh install-ci && mkdir -p /usr/workspace/vali-build && cd /usr/workspace/vali-build && \
cmake -G "Unix Makefiles" -DVALI_ARCH=$VALI_ARCH -DCMAKE_INSTALL_PREFIX=$VALI_INSTALL_DIR ../vali && \
make && make install