summaryrefslogtreecommitdiff
path: root/contrib/build-using-docker
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2023-02-19 17:20:30 +0100
committerAndreas Fankhauser hiddenalpha.ch2023-02-19 17:20:30 +0100
commit4015f6de5c98cab856991a05b27713af90e97e7f (patch)
tree1464d6b6fefeb7b41e78a46fcdb158c38fad6381 /contrib/build-using-docker
parent9e4ff1fe33081c1a4a8639fe2e27ffc6f2d4f48a (diff)
downloadDeflateAndInflate-4015f6de5c98cab856991a05b27713af90e97e7f.zip
DeflateAndInflate-4015f6de5c98cab856991a05b27713af90e97e7f.tar.gz
(build) Simplify build doc
- Include target tripplet into version - Refactor docker build env by a more flexible script variant
Diffstat (limited to 'contrib/build-using-docker')
-rw-r--r--contrib/build-using-docker/Dockerfile35
-rw-r--r--contrib/build-using-docker/README.md64
2 files changed, 0 insertions, 99 deletions
diff --git a/contrib/build-using-docker/Dockerfile b/contrib/build-using-docker/Dockerfile
deleted file mode 100644
index dabcf43..0000000
--- a/contrib/build-using-docker/Dockerfile
+++ /dev/null
@@ -1,35 +0,0 @@
-
-ARG PARENT_IMAGE=alpine:3.16.0
-FROM $PARENT_IMAGE
-
-ARG GIT_TAG=
-ARG CONFIGURE_OPTS=
-ARG MAKE_OPTS=
-ARG PKGS_TO_ADD="curl gcc git make musl-dev tar zlib-dev"
-ARG PKGS_TO_DEL="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_ADD \
- && BR=$(if test -n "$GIT_TAG"; then echo " --branch $GIT_TAG"; else echo ""; fi) \
- && git clone --depth 42 $BR https://github.com/hiddenalpha/DeflateAndInflate.git . \
- && ./configure $CONFIGURE_OPTS \
- && make clean $MAKE_OPTS && make $MAKE_OPTS && make install $MAKE_OPTS \
- && find . -not -wholename './dist*' -delete \
- && find /work -exec chown 1000:1000 {} + \
- && $PKGDEL $PKGS_TO_DEL \
- && $PKGCLEAN \
- && true
-
-USER 1000:1000
-
-# run for max 10 hrs. Because this container is not meant to stay running
-# forever.
-CMD ["sleep", "36000"]
-
diff --git a/contrib/build-using-docker/README.md b/contrib/build-using-docker/README.md
deleted file mode 100644
index 3bf0ae4..0000000
--- a/contrib/build-using-docker/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-
-Showcase how to build and install
-=================================
-
-Sometimes happy developers (like me) have no choice but using horribly
-restricted systems where setting up tools to run even something as simple as
-configure/make/install becomes a nightmare. I found it to be easier to have a
-Dockerfile to build on a totally unrelated machine (but where I have the needed
-privileges) and then just copy-paste the built result over to where I need it.
-
-
-## Setup variable to reduce annoying repetitions
-
-```sh
-IMG=deflateandinflate-showcase:latest
-```
-
-## Make and install dockerimage
-
-```sh
-curl -sSL https://github.com/hiddenalpha/DeflateAndInflate/raw/master/contrib/build-using-docker/Dockerfile | sudo docker build . -f - -t "${IMG:?}"
-```
-
-## Grab distribution archive
-
-Most probably we wanna get the distribution archive. We can copy it out the
-dockerimage to our host using:
-
-```sh
-sudo docker run --rm -i "${IMG:?}" sh -c 'true && cd dist && tar c *' | tar x
-```
-
-WARN: Think for ABI compatibility! By default the dockerimage uses alpine linux
- for compilation. Scroll down to "other targets" if you need to build
- for other targets.
-
-
-## Play around
-
-Or if we wanna browse the image or play around with the built utility we could
-launch a shell. Once in the shell, try `deflate --help` and/or `inflate --help`.
-
-```sh
-sudo docker run --rm -ti "${IMG:?}" sh
-```
-
-
-## Other targets
-
-The dockerfile is parameterized and should work for other systems too. For
-example to compile for debian we could use command like below. May set *IMG*
-differently if you need to keep multiple images.
-
-```sh
-curl -sSL https://github.com/hiddenalpha/DeflateAndInflate/raw/master/contrib/build-using-docker/Dockerfile | sudo docker build . -f - -t "${IMG:?}" \
- --build-arg PARENT_IMAGE=debian:buster-20220622-slim \
- --build-arg PKGS_TO_ADD="curl gcc git make libc-dev ca-certificates tar zlib1g-dev" \
- --build-arg PKGS_TO_DEL="curl gcc git make libc-dev zlib1g-dev" \
- --build-arg PKGINIT="apt-get update" \
- --build-arg PKGADD="apt-get install -y --no-install-recommends" \
- --build-arg PKGDEL="apt-get purge -y" \
- --build-arg PKGCLEAN="apt-get clean"
-```
-