Skip to content

Commit

Permalink
Allow scan-build runs for collector
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 committed Aug 23, 2023
1 parent 0e65636 commit 742dbad
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
8 changes: 7 additions & 1 deletion collector/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
FROM quay.io/stackrox-io/collector-builder:cache

RUN dnf install -y clang-tools-extra && \
RUN dnf install -y \
clang-tools-extra \
clang-analyzer \
podman-docker && \
dnf clean all

# scan-view default port
EXPOSE 8181
3 changes: 2 additions & 1 deletion collector/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ docker-teardown:

.PHONY: docker-deploy
docker-deploy: build docker-teardown
docker run -id --privileged --name collector-builder \
docker run -idP --privileged --name collector-builder \
--entrypoint /bin/bash \
-e CMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-e DISABLE_PROFILING="true" \
Expand All @@ -34,5 +34,6 @@ docker-deploy: build docker-teardown
-v /sys:/host/sys \
-v /etc:/host/etc \
-v /usr/lib:/host/usr/lib \
-v /var/run/docker.sock:/var/run/docker.sock \
-w ${HOME}/go/src/github.com/stackrox/collector \
$(BUILDER_IMAGE)
2 changes: 1 addition & 1 deletion falco-libs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ docker-deploy: build docker-teardown
-v ${HOME}/go/src/github.com/falcosecurity/libs:${HOME}/go/src/github.com/falcosecurity/libs \
-v /usr/src:/usr/src \
-v /lib/modules:/lib/modules \
-v /usr/include/bpf:/usr/include/bpf \
-v /dev:/host/dev \
-v /proc:/host/proc \
-v /sys:/host/sys \
-v /etc:/host/etc \
-v /usr/lib:/host/usr/lib \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /run/podman/podman.sock:/run/podman/podman.sock \
quay.io/mmoltras/devcontainers:falco-libs-$(FALCO_BUILDER_FLAVOR)
4 changes: 4 additions & 0 deletions falco-libs/compile-falco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ function clean () {
function configure () {
# sanitizers="-fsanitize=address -fsanitize=undefined"
use_bundled_libbpf="OFF"
build_shared_libs="OFF"

if [[ "${FALCO_BUILDER_FLAVOR:-fedora}" != "fedora" ]] ; then
# Platform dependent adjustments
use_bundled_libbpf="ON"
else
build_shared_libs="ON"
fi

mkdir -p "${FALCO_DIR}/build"
Expand All @@ -33,6 +36,7 @@ function configure () {
-DUSE_BUNDLED_ZLIB=ON \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCREATE_TEST_TARGETS=ON \
-DBUILD_SHARED_LIBS="${build_shared_libs}" \
-S "${FALCO_DIR}" \
-B "${FALCO_DIR}/build"
}
Expand Down

0 comments on commit 742dbad

Please # to comment.