-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathDockerfile.rvps
More file actions
43 lines (27 loc) · 1.15 KB
/
Dockerfile.rvps
File metadata and controls
43 lines (27 loc) · 1.15 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
37
38
39
40
41
42
43
# Copyright (c) 2023 by Alibaba.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
ARG BASE_IMAGE=alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest
FROM ${BASE_IMAGE} AS builder
ARG ALL_PROXY
ARG NO_PROXY
ENV ALL_PROXY=$ALL_PROXY
ENV NO_PROXY=$NO_PROXY
ARG CARGO_JOBS
WORKDIR /usr/src/rvps
COPY . .
RUN yum install -y cargo curl clang perl protobuf-devel git openssl-devel
RUN sed -i 's/version = 4/version = 3/g' Cargo.lock
RUN if [ -n "$CARGO_JOBS" ]; then \
[ ! -d /root/.cargo ] && mkdir /root/.cargo; \
echo -e "[build]\njobs = $CARGO_JOBS" >> /root/.cargo/config.toml; \
fi
RUN cargo install --bin rvps --path rvps --locked
FROM ${BASE_IMAGE}
RUN yum install -y openssl curl pkg-config && \
curl -L "https://github.com/slsa-framework/slsa-verifier/releases/download/v2.7.1/slsa-verifier-linux-amd64" -o /usr/local/bin/slsa-verifier && \
chmod +x /usr/local/bin/slsa-verifier
COPY --from=builder /root/.cargo/bin/rvps /usr/local/bin/rvps
CMD ["rvps"]
VOLUME /opt/confidential-containers/attestation-service/reference_values/
EXPOSE 50003