-
Notifications
You must be signed in to change notification settings - Fork 393
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added information how to run Tracee on Docker Mac
- Loading branch information
Showing
2 changed files
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
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,28 @@ | ||
Docker for Mac does not come with Kernel headers. | ||
You need to do the following to make Tracee work: | ||
|
||
1. Identify your docker version: | ||
``` | ||
dockerver=$(docker version | grep Version | head -n 1 | cut -d ':' -f 2 | xargs) | ||
``` | ||
|
||
2. Run a container with Docker CLI, while mounting to the host path: | ||
``` | ||
docker run -it -v /:/host -v /var/run/docker.sock:/var/run/docker.sock docker:$dockerver /bin/sh | ||
``` | ||
|
||
3. Get the Kernel Header files from the linuxkit Docker image and copy it to the host /usr/src path: | ||
|
||
``` | ||
mkdir /host/kheader | ||
cd /host/kheader | ||
linux_version="${VERSION:-$(uname -r | cut -d - -f 1)}" | ||
docker pull "linuxkit/kernel:$linux_version" | ||
docker save "linuxkit/kernel:$linux_version" > "linuxkit.tar" | ||
tar -xf "linuxkit.tar" | ||
layertar=$(find . -name layer.tar) | ||
tar -xf "$layertar" | ||
tar -xf "kernel-dev.tar" --directory /host/ | ||
``` | ||
|
||
4. You can now run Tracee on your Docker for Mac |