forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathubuntu
More file actions
28 lines (21 loc) · 702 Bytes
/
ubuntu
File metadata and controls
28 lines (21 loc) · 702 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
FROM ubuntu:22.04
ENV OSCAP_USERNAME oscap
ENV OSCAP_DIR content
ENV BUILD_JOBS 4
RUN true \
&& apt-get -qq update \
&& apt-get -qq install cmake ninja-build libopenscap8 libxml2-utils expat xsltproc python3-jinja2 python3-yaml \
&& mkdir -p /home/$OSCAP_USERNAME \
&& 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 -G Ninja .. \
&& ninja -j $BUILD_JOBS \
&& ctest --output-on-failure -j $BUILD_JOBS \
&& true