FROM vecps:base-v0.1.2

LABEL maintainer="Tosone <i@tosone.cn>"

ARG JQ_VERSION=f9afa950e26f5d548d955f92e83e6b8e10cc8438

RUN git clone https://github.com/jqlang/jq.git jq && \
    cd jq && \
    git checkout ${JQ_VERSION} && \
    git submodule update --init

RUN cd jq && \
    autoreconf -fi && \
    ./configure --with-oniguruma=builtin && \
    make LDFLAGS=-all-static -j4 && \
    mkdir -p /app/jq/bin && \
    cp jq /app/jq/bin && \
    strip /app/jq/bin/jq
