Skip to content

Commit

Permalink
Adds packaging for RHEL (#544)
Browse files Browse the repository at this point in the history
  • Loading branch information
bencer authored and mfdii committed Feb 26, 2019
1 parent 0429883 commit a6c5926
Show file tree
Hide file tree
Showing 3 changed files with 88 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docker/rhel/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM registry.access.redhat.com/rhel7

MAINTAINER Sysdig Support Team <support@sysdig.com>

### Atomic/OpenShift Labels - https://github.com/projectatomic/ContainerApplicationGenericLabels
LABEL name="falco" \
vendor="Sysdig" \
url="http://falco.org/" \
summary="Container Native runtime security" \
description="Falco is an open source project for intrusion and abnormality detection for Cloud Native platforms." \
run='docker run -d --name falco --restart always --privileged --net host --pid host -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro -v /etc:/host/etc:ro --shm-size=350m registry.connect.redhat.com/sysdig/falco'

COPY help.md /tmp/

ENV SYSDIG_HOST_ROOT /host
ENV HOME /root

ADD http://download.draios.com/stable/rpm/draios.repo /etc/yum.repos.d/draios.repo
RUN rpm --import https://s3.amazonaws.com/download.draios.com/DRAIOS-GPG-KEY.public && \
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm && \
yum clean all && \
REPOLIST=rhel-7-server-rpms,rhel-7-server-optional-rpms,epel,draios \
INSTALL_PKGS="gcc dkms kernel-devel kernel-headers python golang-github-cpuguy83-go-md2man falco" && \
yum -y update-minimal --disablerepo "*" --enablerepo ${REPOLIST} --setopt=tsflags=nodocs \
--security --sec-severity=Important --sec-severity=Critical && \
yum -y install --disablerepo "*" --enablerepo ${REPOLIST} --setopt=tsflags=nodocs ${INSTALL_PKGS} && \
### help file markdown to man conversion
go-md2man -in /tmp/help.md -out /help.1 && \
### we delete everything on /usr/src/kernels otherwise it messes up docker-entrypoint.sh
rm -fr /usr/src/kernels && \
rm -df /lib/modules && ln -s $SYSDIG_HOST_ROOT/lib/modules /lib/modules && \
yum clean all

COPY ./docker-entrypoint.sh /

ENTRYPOINT ["/docker-entrypoint.sh"]

CMD ["/usr/bin/falco"]
35 changes: 35 additions & 0 deletions docker/rhel/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
#
# Copyright (C) 2016-2018 Draios Inc dba Sysdig.
#
# This file is part of falco.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

#set -e

# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module

if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then
echo "* Setting up /usr/src links from host"

for i in $(ls $SYSDIG_HOST_ROOT/usr/src)
do
ln -s $SYSDIG_HOST_ROOT/usr/src/$i /usr/src/$i
done

/usr/bin/falco-probe-loader
fi

exec "$@"
15 changes: 15 additions & 0 deletions docker/rhel/help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
% falco (1) Container Image Pages
% Falco Team
% June, 2017

# NAME
falco \- Container Native runtime security

# DESCRIPTION
Falco is an open source project for intrusion and abnormality detection for Cloud Native platforms. See Falco website for more information: http://falco.org/

# EXAMPLE
docker run -d --name falco --restart always --privileged --net host --pid host -v /var/run/docker.sock:/host/var/run/docker.sock -v /dev:/host/dev -v /proc:/host/proc:ro -v /boot:/host/boot:ro -v /lib/modules:/host/lib/modules:ro -v /usr:/host/usr:ro -v /etc:/host/etc:ro --shm-size=350m registry.connect.redhat.com/sysdig/falco

# AUTHORS
Falco Team

0 comments on commit a6c5926

Please sign in to comment.