Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM centos:7

RUN yum --nogpgcheck -y install http://people.redhat.com/rsawhill/rpms/latest-rsawaroha-release.rpm

RUN yum --nogpgcheck -y install rhsecapi
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ sys 0m0.055s
1. Optional: `mkdir -p ~/bin; ln -sv /PATH/TO/rhsecapi.py ~/bin/rhsecapi`
1. Execute: `rhsecapi`

- **Option 3: Install docker version**
1. cd rhsecpai
1. yum install docker for RHEL, can depend on your OS
1. chmod +x install_docker.sh
1. sudo ./install_docker.sh
1. rhsecapi.sh CVE-2015-4642

## Abbreviated usage

Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'

services:
centos_rhsecapi:
build:
context: .
dockerfile: Dockerfile
container_name: centos_rhsecapi
restart: always
command: bash
tty: true
28 changes: 28 additions & 0 deletions install_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

if ! command -v docker &> /dev/null; then
echo "Docker is not installed. Please install Docker and try again."
exit 1
fi

if ! docker info &> /dev/null; then
echo "Docker is not running. Please start Docker and try again."
exit 1
fi

docker-compose build
docker-compose up -d

cat <<EOF > /usr/bin/rhsecapi.sh
#!/bin/bash

# Wrapper script to run rhsecapi inside the Docker container

DOCKER_CONTAINER_NAME="centos_rhsecapi"

docker exec -it \$DOCKER_CONTAINER_NAME rhsecapi "\$@"
EOF

chmod +x /usr/bin/rhsecapi.sh

echo "rhsecapi docker installed!."