Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build multi OS for Docker #452

Merged
merged 22 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For a video introduction, [look at this presentation from SwedenCPP](https://www

Installing
----------
Refer to the [INSTALL](INSTALL.md) file for build instructions, or use our official Docker images:
Refer to the [INSTALL](INSTALL.md) file for build instructions, or use our official Docker image (`kcov/kcov`):

* [kcov/kcov](https://hub.docker.com/r/kcov/kcov/) for releases since v31.

Expand All @@ -27,7 +27,7 @@ How to use it
-------------
Basic usage is straight-forward:

```
```sh
kcov /path/to/outdir executable [args for the executable]
```

Expand All @@ -41,7 +41,7 @@ Filtering output
It's often useful to filter output, since e.g., /usr/include is seldom of interest.
This can be done in two ways:

```
```sh
kcov --exclude-pattern=/usr/include --include-pattern=part/of/path,other/path \
/path/to/outdir executable
```
Expand All @@ -50,7 +50,7 @@ which will do a string-comparison and include everything which contains
*part/of/path* or *other/path* but exclude everything that has the
*/usr/include* string in it.

```
```sh
kcov --include-path=/my/src/path /path/to/outdir executable
kcov --exclude-path=/usr/include /path/to/outdir executable
```
Expand All @@ -63,7 +63,7 @@ Kcov can also merge the results of multiple earlier runs. To use this mode,
call kcov with `--merge`, an output path and one or more paths to an earlier
run, e.g.,

```
```sh
kcov --merge /tmp/merged-output /tmp/kcov-output1 /tmp/kcov-output2
kcov --merge /tmp/merged-output /tmp/kcov-output* # With a wildcard
```
Expand Down
16 changes: 16 additions & 0 deletions doc/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# The docker image

Kcov has a docker image: [kcov/kcov](https://hub.docker.com/r/kcov/kcov/) and tags since v31.

There is two variants (tags):
- `latest` or `vXX` that are Debian based
- `latest-alpine` or `vXX-alpine` that are Alpine based

## Permissions

kcov needs access the following system calls:
- [`ptrace`](https://linux.die.net/man/2/ptrace)
- [`process_vm_readv`](https://linux.die.net/man/2/process_vm_readv)/[`process_vm_writev`](https://linux.die.net/man/2/process_vm_writev)
- [`personality`](https://linux.die.net/man/2/personality)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well written with references!


You may need to use `--security-opt seccomp=unconfined` as a docker run option to attach to processes.