-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (36 loc) · 966 Bytes
/
Dockerfile
File metadata and controls
44 lines (36 loc) · 966 Bytes
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
ARG ALPINE=alpine:3.8
FROM ${ALPINE} AS build
RUN apk add --no-cache \
autoconf \
automake \
file \
gcc \
git \
libtool \
make \
musl-dev \
valgrind
WORKDIR /usr/local/src
ARG JQ_TAG=jq-1.6
RUN git clone --branch ${JQ_TAG} --quiet --recurse-submodules https://github.com/stedolan/jq
RUN git config --global submodule.modules/oniguruma.ignore dirty
WORKDIR /usr/local/src/jq
RUN ./configure --help &>/dev/null || autoreconf -fi
RUN ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--disable-docs \
--disable-dependency-tracking \
--disable-maintainer-mode \
--disable-shared \
--enable-all-static
RUN make -j4 LD_FLAGS=-all-static
# RUN make -j4 check
RUN make -j4 prefix=/opt/local install
FROM scratch
COPY --from=build /opt/local/bin/ /opt/local/bin/
COPY --from=build /opt/local/share/ /opt/local/share/
ENV PATH /opt/local/bin
ENTRYPOINT ["jq"]
CMD ["--help"]