diff options
author | Daniel Salzman <daniel.salzman@nic.cz> | 2021-11-22 13:27:25 +0100 |
---|---|---|
committer | Daniel Salzman <daniel.salzman@nic.cz> | 2021-11-22 13:37:29 +0100 |
commit | 01f4d6c6eb174aec215f9526c04a1831e48b5edc (patch) | |
tree | b0838eea1569f2eebf5b8484186ab4f6dc630f29 /Dockerfile | |
parent | kzonesign: refactoring, add support for confdb and auto detection (diff) | |
download | knot-01f4d6c6eb174aec215f9526c04a1831e48b5edc.tar.xz knot-01f4d6c6eb174aec215f9526c04a1831e48b5edc.zip |
Dockerfile: add options and improve building
- New option FASTPARSER=disable|enable
- New option CHECK=disable|enable for unittests execution
- Explicit CFLAGS="-g -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -fstack-protector-strong"
- Added --enable-dnstap
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile index 2e8f83987..3085df1e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,16 +30,23 @@ RUN apt-get update && \ # Build the project COPY . /knot-src WORKDIR /knot-src +ARG FASTPARSER=disable RUN autoreconf -if && \ + CFLAGS="-g -O2 -DNDEBUG -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ ./configure --prefix=/ \ --with-rundir=/rundir \ --with-storage=/storage \ --with-configdir=/config \ --with-module-dnstap=yes \ - --disable-fastparser \ + --${FASTPARSER}-fastparser \ + --enable-dnstap \ --disable-static \ --disable-documentation && \ - make -j$(grep -c ^processor /proc/cpuinfo) && \ + make -j$(grep -c ^processor /proc/cpuinfo) + +# Run unittests if requested and install the project +ARG CHECK=disable +RUN if [ "$CHECK" = "enable" ]; then make -j$(grep -c ^processor /proc/cpuinfo) check; fi && \ make install DESTDIR=/tmp/knot-install ## Final stage ## |