From 0c76d3dbcd188368f1466b593430b7adc048750f Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Fri, 22 Jul 2022 19:35:35 +0200 Subject: [PATCH] added Dockerfile (for real now) --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8505aa4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM alpine:latest +#VERSION can be: +# - stable: builds latest stable versions from source (default) +# - distro: uses packages as provided by Alpine Linux (may be slightly out of date) +# - devel: latest development version (git master/main branch) +ARG VERSION="stable" +LABEL org.opencontainers.image.authors="Maarten van Gompel " +LABEL description="FoLiA utilities" + +RUN mkdir -p /data +RUN mkdir -p /usr/src/foliautils +COPY . /usr/src/foliautils + +RUN if [ "$VERSION" = "distro" ]; then \ + rm -Rf /usr/src/foliautils &&\ + echo -e "----------------------------------------------------------\nNOTE: Installing latest release as provided by Alpine package manager.\nThis version may diverge from the one in the git master tree or even from the latest release on github!\nFor development, build with --build-arg VERSION=development.\n----------------------------------------------------------\n" &&\ + apk update && apk add foliautils; \ + else \ + PACKAGES="libtar libbz2 icu-libs libxml2 libxslt libexttextcat libgomp libstdc++" &&\ + BUILD_PACKAGES="build-base autoconf-archive autoconf automake libtool libtar-dev bzip2-dev icu-dev libxml2-dev libxslt-dev libexttextcat-dev git" &&\ + apk add $PACKAGES $BUILD_PACKAGES &&\ + cd /usr/src/ && ./foliautils/build-deps.sh &&\ + cd foliautils && sh ./bootstrap.sh && ./configure && make && make install &&\ + apk del $BUILD_PACKAGES && rm -Rf /usr/src; \ + fi + +WORKDIR / + +ENTRYPOINT [ "ash" ]