summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Hansson <hansson.mattias@gmail.com>2019-03-28 21:45:29 +0100
committerNico Williams <nico@cryptonector.com>2019-03-29 08:19:41 -0500
commit584370127a49bf0663b864cb5b3a836ee8cb8399 (patch)
treecbfe3a8f99b12b4645e95a616fc888c341bba9bd
parent528a4f59450402b1fe97a6f20307e5187c190eb7 (diff)
Dockerfile: Fetch dependency as git submodule
Fetch oniguruma using git submodule instead of a release tarball. It will fix a build problem, caused by jq's autotools configuration, trying to run `make distclean` recursively in an empty modules directory. This will also improve the maintainability of the Dockerfile.
-rw-r--r--Dockerfile17
1 files changed, 6 insertions, 11 deletions
diff --git a/Dockerfile b/Dockerfile
index ef737a65..e6ce6daa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,25 +21,18 @@ RUN apt-get update && \
python3 \
python3-pip \
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 && \
+ git submodule init && \
+ git submodule update && \
autoreconf -i && \
./configure --disable-valgrind --enable-all-static --prefix=/usr/local && \
make -j8 && \
make check && \
make install && \
make distclean ) && \
- (cd oniguruma-5.9.6 && \
+ (cd /app/modules/oniguruma && \
make uninstall ) && \
apt-get purge -y \
build-essential \
@@ -51,7 +44,9 @@ RUN apt-get update && \
python3 \
python3-pip && \
apt-get autoremove -y && \
- rm -rf oniguruma-5.9.6 && \
+ rm -rf /app/modules/oniguruma/* && \
+ rm -rf /app/modules/oniguruma/.git && \
+ rm -rf /app/modules/oniguruma/.gitignore && \
rm -rf /var/lib/apt/lists/* /var/lib/gems
ENTRYPOINT ["/usr/local/bin/jq"]