File: usage

package info (click to toggle)
sysdig 0.35.0%2Brepack-1.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,600 kB
  • sloc: cpp: 11,020; sh: 1,313; ansic: 999; makefile: 12
file content (53 lines) | stat: -rwxr-xr-x 2,189 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash

gccversion=$(gcc --version | head -n1)
cppversion=$(g++ -dM -E -x c++ /dev/null | grep -F __cplusplus | cut -d' ' -f3)
cmakeversion=$(cmake --version | head -n1)
clangversion=$(clang --version | head -n1)

cat <<EOF
Hello, this is the Sysdig builder container.

How to use.

    The default commands for the Sysdig builder image reports usage and environment info.
    * docker run sysdig/sysdig-builder
    * docker run sysdig/sysdig-builder usage

    It supports bash.
    * docker run -ti sysdig/sysdig-builder bash

    To build it needs:
    - The source directory in /source (ie., the directory containing the sysdig tree)

    Optionally, you can also bind-mount the build directory.
    So, you can execute it from the root directory as follows.

    * docker run -v $PWD/..:/source -v $PWD/build:/build sysdig/sysdig-builder cmake
    * docker run -v $PWD/..:/source -v $PWD/build:/build sysdig/sysdig-builder [<cmake-target-x>, ..., <cmake-target-y>]

    Eg.,
    * docker run -v $PWD/..:/source -v $PWD/build:/build sysdig/sysdig-builder tests
    * docker run -v $PWD/..:/source -v $PWD/build:/build sysdig/sysdig-builder install

How to build.

    * cd docker/builder && DOCKER_BUILDKIT=1 docker build -t sysdig/sysdig-builder .

    In case you want to customise the builder at build time the following build arguments are provided:
    - BUILD_TYPE                whether you want a "release" or "debug" build (defaults to "release").
    - BUILD_DRIVER              whether to build the driver or not (defaults to "OFF")
    - BUILD_BPF                 whether to build the BPF driver or not (defaults to "OFF")
    - BUILD_WARNINGS_AS_ERRORS  whether to intend warnings as errors or not (defaults to "ON")
    - MAKE_JOBS                 the number of jobs to use during make (defaults to "4")
    - BUILD_VERSION             the version to label the build (built from git index in case it is missing)

    It is possible to change these at runtime (in the container) since environment variables with the same names are provided, too.

Environment.

    * ${gccversion}
    * cplusplus ${cppversion}
    * ${cmakeversion}
    * ${clangversion}
EOF