diff options
author | Andreas Fankhauser (@tux-six) | 2022-07-06 22:24:30 +0200 |
---|---|---|
committer | Andreas Fankhauser (@tux-six) | 2022-07-06 22:24:30 +0200 |
commit | 6d4c51fe445b80f56506df7541c8d4fd2488dbd1 (patch) | |
tree | 0ce631914071a559441698d3d7a84e104d7b4395 /contrib/build-using-docker/Dockerfile | |
parent | 0d745cdb688eab40094c434d2564515705ce686b (diff) | |
parent | b627374773e3256fbd08fb204fcced3233b9c97e (diff) | |
download | bulk-ln-6d4c51fe445b80f56506df7541c8d4fd2488dbd1.zip bulk-ln-6d4c51fe445b80f56506df7541c8d4fd2488dbd1.tar.gz |
Merge 'contrib Dockerfile for tarball' to master
Diffstat (limited to 'contrib/build-using-docker/Dockerfile')
-rw-r--r-- | contrib/build-using-docker/Dockerfile | 34 |
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..78f1a85 --- /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" +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 https://git.hiddenalpha.ch/bulk-ln.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"] + |