summaryrefslogtreecommitdiffstats
path: root/Dockerfile
blob: d35e4ada532f5a436e8fb63594f6a00f28bd703f (plain)
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
FROM debian:8

COPY . /app

# get dependencies, build, and remove anything we don't need for running jq.
# valgrind seems to have trouble with pthreads TLS so it's off.

RUN apt-get update && \
    apt-get install -y \
        build-essential \
        autoconf \
        libtool \
        git \
        bison \
        flex \
        python3 \
        wget && \
    wget https://github.com/kkos/oniguruma/archive/v5.9.6.tar.gz -O onig-5.9.6.tar.gz && \
    sha512sum onig-5.9.6.tar.gz | grep 6b048d345e148c9da38af7a8df76d4a358eb3d4db91fa7834076e511f526a63544284f212b0d56badbbd33112c8b458a5fff02bfbbda012ecfe478bc436ea679 && \
    tar zxvf onig-5.9.6.tar.gz && \
    (cd oniguruma-5.9.6 && \
        touch NEWS ChangeLog && \
        autoreconf -i && \
        ./configure --prefix=/usr/local && \
        make && \
        make install ) && \
    pip3 install pipenv && \
    (cd /app/docs && pipenv sync) && \
    (cd /app && \
        autoreconf -i && \
        ./configure --disable-valgrind --enable-all-static --prefix=/usr/local && \
        make -j8 && \
        make check && \
        make install && \
        make distclean ) && \
    (cd oniguruma-5.9.6 && \
        make uninstall ) && \
    apt-get purge -y \
        build-essential \
        autoconf \
        libtool \
        bison \
        git \
        flex \
        python3 && \
    apt-get autoremove -y && \
    rm -rf oniguruma-5.9.6 && \
    rm -rf /var/lib/apt/lists/* /var/lib/gems

ENTRYPOINT ["/usr/local/bin/jq"]
CMD []