From 9876d3ae3f1a5b100f1a73a94123eb35b0f397d1 Mon Sep 17 00:00:00 2001 From: "Mohammed A.Q" <65144622+mohammedalqadi@users.noreply.github.com> Date: Tue, 19 May 2020 03:35:45 +0000 Subject: [PATCH] Create Dockerfile for arm64v8 architecture --- Dockerfile.aarch64 | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Dockerfile.aarch64 diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 new file mode 100644 index 0000000..1d689f2 --- /dev/null +++ b/Dockerfile.aarch64 @@ -0,0 +1,67 @@ +FROM lsiobase/python:arm64v8-3.11 + +# set version release +ARG WHOOGLESEARCH_RELEASE +ARG BUILD_DATE=unspecified +ARG VCS_REF=unspecified + +# set python to use utf-8 rather than ascii. +ENV PYTHONIOENCODING="UTF-8" + +# enforced https, default false +ARG use_https='' +ENV HTTPS_ONLY="$use_https" + +LABEL org.label-schema.name="Whoogle Search" +LABEL org.label-schema.description="Self-hosted, ad-free, privacy-respecting Google metasearch engine" +LABEL org.label-schema.vcs-url="https://github.com/benbusby/whoogle-search" +LABEL org.label-schema.build-date="${BUILD_DATE}" +LABEL org.label-schema.vcs-ref="${VCS_REF}" + +RUN \ + echo "**** install build packages ****" && \ + apk add --no-cache --upgrade --virtual .build-dependencies \ + g++ \ + git \ + curl-dev \ + libressl-dev \ + libffi-dev \ + python3-dev && \ + echo "**** install runtime packages ****" && \ + apk add --no-cache --upgrade \ + curl \ + py3-pip \ + python3 \ + tar && \ + echo "**** install app ****" && \ + mkdir -p \ + /tmp/whooglesearch && \ + if [ -z ${WHOOGLESEARCH_RELEASE+x} ]; then \ + WHOOGLESEARCH_RELEASE=$(curl -sX GET "https://api.github.com/repos/benbusby/whoogle-search/commits/master" \ + | awk '/sha/{print $4;exit}' FS='[""]'); \ + fi && \ + curl -o \ + /tmp/whooglesearch.tar.gz -L \ + "https://github.com/benbusby/whoogle-search/archive/${WHOOGLESEARCH_RELEASE}.tar.gz" && \ + tar xf \ + /tmp/whooglesearch.tar.gz -C \ + /tmp/whooglesearch --strip-components=1 && \ + echo "**** install pip packages ****" && \ + pip3 install --no-cache-dir -r \ + /tmp/whooglesearch/requirements.txt && \ + cp -r /tmp/whooglesearch/app / && \ + echo "**** clean up ****" && \ + apk del --purge \ + .build-dependencies && \ + rm -rf \ + /tmp/* + +# set config location +ENV CONFIG_VOLUME="/config" + +# add local files +COPY root/ / + +# ports and volumes +EXPOSE 5000 +VOLUME /config