forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcentos8
More file actions
31 lines (24 loc) · 827 Bytes
/
centos8
File metadata and controls
31 lines (24 loc) · 827 Bytes
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
FROM centos:8
ENV OSCAP_USERNAME oscap
ENV OSCAP_DIR content
ENV BUILD_JOBS 4
RUN true \
&& dnf -y upgrade \
&& dnf -y install cmake openscap-utils python3-jinja2 \
python3-libs python3-pip python3-pyyaml dnf-plugins-core \
&& dnf -y --enablerepo=powertools install ninja-build \
&& mkdir -p /home/$OSCAP_USERNAME \
&& dnf clean all \
&& rm -rf /usr/share/doc /usr/share/doc-base \
/usr/share/man /usr/share/locale /usr/share/zoneinfo \
&& true
WORKDIR /home/$OSCAP_USERNAME
COPY . $OSCAP_DIR/
# clean the build dir in case the user is also building SSG locally
RUN rm -rf $OSCAP_DIR/build/*
WORKDIR /home/$OSCAP_USERNAME/$OSCAP_DIR/build
CMD true \
&& cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 -G Ninja .. \
&& ninja -j $BUILD_JOBS \
&& ctest --output-on-failure -j $BUILD_JOBS \
&& true