forked from ComplianceAsCode/content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from SUSE/tumbleweed_container
Add Dockerfile for the Tumbleweed build container
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM opensuse/tumbleweed | ||
|
||
ENV OSCAP_USERNAME oscap | ||
ENV OSCAP_DIR content | ||
ENV BUILD_JOBS 4 | ||
|
||
RUN true \ | ||
&& zypper --non-interactive in cmake ninja expat openscap-utils libxml2-tools libxslt-tools python3-PyYAML python3-Jinja2 python3-pytest python3-pytest-cov python3-Sphinx python3-sphinx_rtd_theme python3-pip python3-recommonmark \ | ||
&& pip install pip --upgrade \ | ||
&& pip install json2html sphinxcontrib.jinjadomain \ | ||
&& 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 |