summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAndreas Fankhauser (@tux-six)2022-07-07 02:40:50 +0200
committerAndreas Fankhauser (@tux-six)2022-07-07 02:42:44 +0200
commit8715622ee3a0c0daa74934e5a349bd47c7fd23bd (patch)
treee28a7ecf6674eb168c14a0c3292a318083fdc9df /contrib
parentc8cae553fb0058e7defef83669c8ac572e7f0d99 (diff)
downloadDeflateAndInflate-8715622ee3a0c0daa74934e5a349bd47c7fd23bd.zip
DeflateAndInflate-8715622ee3a0c0daa74934e5a349bd47c7fd23bd.tar.gz
Cleanup, setup 'configure', add contrib Dockerfile for simpler build
Diffstat (limited to 'contrib')
-rw-r--r--contrib/build-using-docker/Dockerfile34
1 files changed, 34 insertions, 0 deletions
diff --git a/contrib/build-using-docker/Dockerfile b/contrib/build-using-docker/Dockerfile
new file mode 100644
index 0000000..aaca6ad
--- /dev/null
+++ b/contrib/build-using-docker/Dockerfile
@@ -0,0 +1,34 @@
+
+ARG PARENT_IMAGE=alpine:3.16.0
+FROM $PARENT_IMAGE
+
+ARG GIT_TAG=
+ARG CONFIGURE_OPTS=
+ARG PKGS_TO_INSTALL="curl gcc git make musl-dev tar zlib-dev"
+ARG PKGINIT=true
+ARG PKGADD="apk add"
+ARG PKGDEL="apk del"
+ARG PKGCLEAN=true
+
+WORKDIR /work
+
+RUN true \
+ && $PKGINIT \
+ && $PKGADD $PKGS_TO_INSTALL \
+ && git clone http://git.hiddenalpha.ch/DeflateAndInflate.git . \
+ && git config advice.detachedHead false \
+ && if test -n "$GIT_TAG"; then git checkout "$GIT_TAG"; fi \
+ && ./configure $CONFIGURE_OPTS \
+ && make clean && make && make install \
+ && find . -not -wholename './dist*' -delete \
+ && find /work -exec chown 1000:1000 {} + \
+ && $PKGDEL $PKGS_TO_INSTALL \
+ && $PKGCLEAN \
+ && true
+
+USER 1000:1000
+
+# run for max 10 hrs. Because this container is not meant to stay running
+# forever.
+CMD ["sleep 36000"]
+