mirror of
https://github.com/jqlang/jq.git
synced 2025-04-18 17:24:01 +03:00
Previously, the configure script automatically enables Valgrind during testing when the valgrind command is found. However, running tests with Valgrind is quite slow, so it is better to disable it by default, and to enable it only when the user specifies the `--enable-valgrind` flag.
35 lines
713 B
Docker
35 lines
713 B
Docker
FROM debian:12-slim AS builder
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive \
|
|
DEBCONF_NONINTERACTIVE_SEEN=true \
|
|
LC_ALL=C.UTF-8 \
|
|
LANG=C.UTF-8
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y \
|
|
build-essential \
|
|
autoconf \
|
|
libtool \
|
|
git \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
COPY . /app
|
|
RUN autoreconf -i \
|
|
&& ./configure \
|
|
--disable-docs \
|
|
--with-oniguruma=builtin \
|
|
--enable-static \
|
|
--enable-all-static \
|
|
--prefix=/usr/local \
|
|
&& make -j$(nproc) \
|
|
&& make check VERBOSE=yes \
|
|
&& make install-strip
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /app/AUTHORS /app/COPYING /usr/local/bin/jq /
|
|
RUN ["/jq", "--version"]
|
|
ENTRYPOINT ["/jq"]
|