forked from trustification/trustify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContainerfile
48 lines (30 loc) · 1.1 KB
/
Containerfile
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
44
45
46
47
48
FROM registry.access.redhat.com/ubi9/ubi:latest
ARG RUST_VERSION="1.80.1"
RUN dnf install -y gcc openssl openssl-devel cmake gcc-c++ git curl-minimal
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain ${RUST_VERSION}
ENV PATH "$PATH:/root/.cargo/bin"
RUN mkdir /usr/src/project
COPY . /usr/src/project
WORKDIR /usr/src/project
RUN cargo build --release
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
LABEL com.redhat.component ="Trustify"
LABEL description ="Trustify"
LABEL io.k8s.description ="Trustify"
LABEL io.k8s.display-name ="Trustify"
LABEL io.openshift.tags ="Trustify"
LABEL name ="Trustify"
LABEL org.opencontainers.image.source="https://github.com/trustification/rhtpa"
LABEL konflux.additional-tags="tests"
LABEL summary ="Trustify"
RUN microdnf reinstall tzdata -y
ENV TZ=UTC
RUN mkdir trustify
COPY --from=0 /usr/src/project/target/release/trustd trustify
COPY --from=0 /usr/src/project/test.sh trustify
RUN useradd -ms /bin/bash trustify
RUN chown trustify -R trustify
RUN mkdir /licenses
COPY ./LICENSE /licenses/AL
USER trustify
WORKDIR trustify