Skip to content

Commit

Permalink
Move the additional packages into Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
alanmcanonical committed Oct 21, 2024
1 parent a11711d commit e49e7e7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automatus-ubuntu2204.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
run: ssh-keygen -N '' -t rsa -f ~/.ssh/id_rsa
- name: Build test suite container
if: ${{ steps.ctf.outputs.CTF_OUTPUT_SIZE != '0' }}
run: podman build --build-arg "CLIENT_PUBLIC_KEY=$(cat ~/.ssh/id_rsa.pub)" --build-arg "ADDITIONAL_PACKAGES=cmake ninja-build python3-yaml python3-jinja2 python3-deepdiff python3-requests jq python3-pip libxml2-utils xsltproc ansible-lint wget libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt20-dev libselinux1-dev libxslt1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev libldap2-dev libpcre3-dev python3 swig libxml-parser-perl libxml-xpath-perl libperl-dev libbz2-dev librpm-dev g++ libyaml-dev libxmlsec1-dev libxmlsec1-openssl" -t ssg_test_suite -f test_suite-ubuntu2204
run: podman build --build-arg "CLIENT_PUBLIC_KEY=$(cat ~/.ssh/id_rsa.pub)" -t ssg_test_suite -f test_suite-ubuntu2204
working-directory: ./Dockerfiles
- name: Get oscap-ssh
if: ${{ steps.ctf.outputs.CTF_OUTPUT_SIZE != '0' }}
Expand Down
9 changes: 6 additions & 3 deletions Dockerfiles/test_suite-ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ ARG DEBIAN_FRONTEND=noninteractive
# Install Python so Ansible remediations can work
# Don't clean all, as the test scenario may require package install.
RUN true \
&& apt-get update && apt-get install -y openssh-server \
python3 \
$ADDITIONAL_PACKAGES \
&& apt update \
&& apt install -y cmake g++ libacl1-dev libblkid-dev libbz2-dev libcap-dev libcurl4-openssl-dev libdbus-1-dev libdbus-glib-1-dev \
libgconf2-dev libgcrypt20-dev libldap2-dev libpcre2-dev libperl-dev librpm-dev libselinux1-dev libxml2-dev libxml-parser-perl \
libxmlsec1-dev libxmlsec1-openssl libxml-xpath-perl libxslt1-dev libyaml-dev openssh-server python3-dev swig wget \
$ADDITIONAL_PACKAGES \
&& true

RUN true \
&& wget https://github.com/OpenSCAP/openscap/releases/download/1.3.10/openscap-1.3.10.tar.gz \
&& tar xf openscap-1.3.10.tar.gz && cd openscap-1.3.10 \
&& cmake -Bbuild -DCMAKE_INSTALL_PREFIX=/usr . \
&& cmake --build build --target install

RUN true \
&& ssh-keygen -A \
&& mkdir -p /root/.ssh \
Expand Down

0 comments on commit e49e7e7

Please sign in to comment.