forked from IABTechLab/uid2-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.nitro.builder
34 lines (26 loc) · 1.12 KB
/
Dockerfile.nitro.builder
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
FROM debian:bullseye
ENV enclave_platform="aws-nitro"
# install build-essential, openjdk, maven, git
RUN apt-get update -y \
&& apt-get install -y curl -y build-essential pkg-config libssl-dev cmake openjdk-11-jdk maven git \
&& rm -rf /var/lib/apt/lists/*
# install rust
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
WORKDIR /build
ADD conf ./conf
ADD src ./src
ADD static ./static
COPY ./pom.xml ./pom.xml
# build operator jar and save package version
RUN mvn package -B -Paws -DskipTests=true \
&& (mvn help:evaluate -Dexpression=project.version | grep -e '^[1-9][^\[]' > ./package.version)
# build libjnsm.so
RUN git clone https://github.com/IABTechLab/nsm-java.git \
&& (cd nsm-java/jnsm; cargo build --lib --release; cd ../..) \
&& cp nsm-java/jnsm/target/release/libjnsm.so .
# build vsockpx
RUN git clone https://github.com/IABTechLab/vsock-skeleton-key.git \
&& mkdir vsock-skeleton-key/build \
&& (cd vsock-skeleton-key/build; cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo; make; cd ../..) \
&& cp vsock-skeleton-key/build/vsock-bridge/src/vsock-bridge ./vsockpx