summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAndreas Fankhauser hiddenalpha.ch2023-11-04 23:18:23 +0100
committerAndreas Fankhauser hiddenalpha.ch2023-11-04 23:18:23 +0100
commitbf32886848adf2a455fe0533e57632fd6b8f13eb (patch)
treecd4ab8a911b905a9a559c69c7dfe3226ffb3838a /src/main
parent8604ad484d89df24ad021c11aedcfa67b55c5d4f (diff)
downloadUnspecifiedGarbage-bf32886848adf2a455fe0533e57632fd6b8f13eb.zip
UnspecifiedGarbage-bf32886848adf2a455fe0533e57632fd6b8f13eb.tar.gz
Migrated some dockerfiles to portable POSIX qemu scripts.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/c/PcapOne/PcapOne.c311
-rw-r--r--src/main/docker/android-dev.Dockerfile44
-rw-r--r--src/main/docker/gcc-windoof.Dockerfile233
-rw-r--r--src/main/docker/gcc.Dockerfile220
-rw-r--r--src/main/docker/gxx.Dockerfile17
-rw-r--r--src/main/docker/jni.Dockerfile20
-rw-r--r--src/main/docker/jre8.Dockerfile27
-rw-r--r--src/main/docker/maven.Dockerfile35
-rw-r--r--src/main/docker/nginx.Dockerfile50
-rw-r--r--src/main/docker/zlib-deb.Dockerfile49
-rw-r--r--src/main/docker/zlib-mingw.Dockerfile51
11 files changed, 0 insertions, 1057 deletions
diff --git a/src/main/c/PcapOne/PcapOne.c b/src/main/c/PcapOne/PcapOne.c
deleted file mode 100644
index 2eb9e25..0000000
--- a/src/main/c/PcapOne/PcapOne.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* TODO fix this bullshit */
-typedef unsigned u_int;
-typedef unsigned short u_short;
-typedef unsigned char u_char;
-#include <pcap/pcap.h>
-/* endOf TODO */
-
-
-/* System */
-#include <assert.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <string.h>
-
-static char const*const DEV_STDIN = "/dev/stdin";
-
-#define FLG_isHelp (1<<0)
-#define FLG_isTcpPsh (1<<3)
-#define FLG_isTcpRst (1<<4)
-#define FLG_isTcpSyn (1<<5)
-#define FLG_isTcpFin (1<<6)
-#define FLG_isHttpReq (1<<7)
-#define FLG_isLlLinux (1<<12)
-#define FLG_isHdrPrinted (1<<13)
-#define FLG_INIT (0)
-
-typedef struct PcapOne PcapOne;
-
-
-struct PcapOne {
- uint_least16_t flg;
- const char *dumpFilePath;
- char *pcapErrbuf;
- pcap_t *pcap;
- unsigned long frameNr;
- struct/*most recent frame*/{
- int llProto;
- int llHdrEnd;
- };
- struct/*most recent packet*/{
- int netProto;
- int netBodyLen;
- int netHdrEnd;
- int_fast32_t netTotLen;
- uint_least32_t ipSrcAddr, ipDstAddr;
- };
- struct/*most recent segment*/{
- int trspBodyLen;
- int trspSrcPort, trspDstPort;
- int trspHdrEnd;
- };
- struct/*most recent http requst*/{
- const uint8_t *httpReqHeadline;
- int httpReqHeadline_len;
- int httpReq_off; /* pkg offset from begin of most recent request */
- };
-};
-
-
-/*BEG func fwd decl*/
-static void parse_ll_LINUX_SLL( PcapOne*, const struct pcap_pkthdr*, const u_char* );
-static void parse_net_IPv4( PcapOne*, const struct pcap_pkthdr*, const u_char* );
-static void parse_trsp_TCP( PcapOne*, const struct pcap_pkthdr*, const u_char* );
-static void parse_appl_HTTP_req( PcapOne*, const struct pcap_pkthdr*, const u_char* );
-static void printParsingResults( PcapOne*, const struct pcap_pkthdr* );
-/*END func fwd decl*/
-
-static void printHelp(){
- #define STRQUOT_21a9ffbe344c0792ed88688d6c676359(s) #s
- #define STRQUOT(s) STRQUOT_21a9ffbe344c0792ed88688d6c676359(s)
- const char *basename = "/"__FILE__ + sizeof("/"__FILE__);
- for(; basename[-1] != '/'; --basename );
- printf("%s%s%s", " \n"
- " ", basename, " " STRQUOT(PROJECT_VERSION) "\n"
- " \n"
- " Options:\n"
- " \n"
- " --pcap-stdin\n"
- " Like --pcap but reading from stdin.\n"
- " \n"
- " --pcap <path>\n"
- " Pcap file to operate on. Compressed files are NOT supported.\n"
- " \n");
- #undef STRQUOT_21a9ffbe344c0792ed88688d6c676359
- #undef STRQUOT
-}
-
-
-static int parseArgs( PcapOne*app, int argc, char**argv ){
- app->flg = FLG_INIT;
- app->dumpFilePath = NULL;
- for( int iA = 1 ; iA < argc ; ++iA ){
- const char *arg = argv[iA];
- if(0){
- }else if( !strcmp(arg,"--help") ){
- app->flg |= FLG_isHelp; return 0;
- }else if( !strcmp(arg,"--pcap") ){
- arg = argv[++iA];
- if( arg == NULL ){ fprintf(stderr, "EINVAL --pcap needs value\n"); return -1; }
- app->dumpFilePath = arg;
- }else if( !strcmp(arg,"--pcap-stdin") ){
- app->dumpFilePath = DEV_STDIN;
- }else{
- fprintf(stderr, "EINVAL: %s\n", arg); return -1;
- }
- }
- if( app->dumpFilePath == NULL ){
- fprintf(stderr, "EINVAL Arg missing: --pcap <path>\n"); return -1; }
- return 0;
-}
-
-
-static void onPcapPkg( u_char*user, const struct pcap_pkthdr*hdr, const u_char*buf ){
- PcapOne *const app = (void*)user;
-
- /* prepare for this new packet */
- app->frameNr += 1;
- app->flg &= ~(FLG_isTcpPsh | FLG_isTcpRst | FLG_isTcpSyn | FLG_isTcpFin | FLG_isHttpReq);
-
- /* data-link layer */
- switch( pcap_datalink(app->pcap) ){
- case 0x71: parse_ll_LINUX_SLL(app, hdr, buf); break;
- default: assert(!fprintf(stderr,"pcap_datalink() -> 0x%02X\n", pcap_datalink(app->pcap)));
- }
-
- /* network layer */
- switch( app->llProto ){
- case 0x0800: parse_net_IPv4(app, hdr, buf); break;
- default: printf("???, proto=0x%04X, network-layer\n", app->llProto); return;
- }
-
- /* transport layer */
- switch( app->netProto ){
- case 0x06: parse_trsp_TCP(app, hdr, buf); break;
- default: printf("???, proto=0x%02X, transport-layer\n", app->netProto); return;
- }
-
- assert(app->trspBodyLen >= 0);
-
- /* application layer, towards server */
- switch( app->trspDstPort ){
- case 80: parse_appl_HTTP_req(app, hdr, buf); break;
- case 7012: parse_appl_HTTP_req(app, hdr, buf); break;
- case 8080: parse_appl_HTTP_req(app, hdr, buf); break;
- }
-
- printParsingResults(app, hdr);
-}
-
-
-static void parse_ll_LINUX_SLL( PcapOne*app, const struct pcap_pkthdr*hdr, const u_char*buf ){
- assert(hdr->caplen >= 15);
- app->llProto = buf[14]<<8 | buf[15];
- app->llHdrEnd = 16;
-}
-
-
-static void parse_net_IPv4( PcapOne*app, const struct pcap_pkthdr*hdr, const u_char*buf ){
- assert(hdr->caplen >= app->llHdrEnd+19 && "TODO_775afde7f19010220e9df8d5e2924c3e");
- int_fast8_t netHdrLen = (buf[app->llHdrEnd+0] & 0x0F) * 4;
- app->netTotLen = buf[app->llHdrEnd+2] << 8 | buf[app->llHdrEnd+3];
- app->netProto = buf[app->llHdrEnd+9];
- app->ipSrcAddr = 0
- | ((uint_least32_t)buf[app->llHdrEnd+12]) << 24
- | ((uint_least32_t)buf[app->llHdrEnd+13]) << 16
- | buf[app->llHdrEnd+14] << 8
- | buf[app->llHdrEnd+15] ;
- app->ipDstAddr = 0
- | ((uint_least32_t)buf[app->llHdrEnd+16]) << 24
- | ((uint_least32_t)buf[app->llHdrEnd+17]) << 16
- | buf[app->llHdrEnd+18] << 8
- | buf[app->llHdrEnd+19] ;
- app->netHdrEnd = app->llHdrEnd + netHdrLen;
- app->netBodyLen = app->netTotLen - netHdrLen;
-}
-
-
-static void parse_trsp_TCP( PcapOne*app, const struct pcap_pkthdr*hdr, const u_char*buf ){
- assert(hdr->caplen >= app->netHdrEnd+12 && "TODO_058d5f41043d383e1ba2c492d0db4b6a");
- app->trspSrcPort = buf[app->netHdrEnd+0] << 8 | buf[app->netHdrEnd+1];
- app->trspDstPort = buf[app->netHdrEnd+2] << 8 | buf[app->netHdrEnd+3];
- int tcpHdrLen = (buf[app->netHdrEnd+12] >> 4) * 4;
- app->trspHdrEnd = app->netHdrEnd + tcpHdrLen;
- app->trspBodyLen = app->netBodyLen - tcpHdrLen;
-}
-
-
-static void parse_appl_HTTP_req( PcapOne*app, const struct pcap_pkthdr*hdr, const u_char*buf ){
- app->flg |= FLG_isHttpReq;
- app->httpReqHeadline = buf + app->trspHdrEnd;
- app->httpReqHeadline_len = 0;
- for(;; ++app->httpReqHeadline_len ){
- if( (app->trspHdrEnd + app->httpReqHeadline_len) > hdr->caplen ) break;
- if( app->httpReqHeadline[app->httpReqHeadline_len] == '\r' ) break;
- if( app->httpReqHeadline[app->httpReqHeadline_len] == '\n' ) break;
- }
- /* TODO improve, as now its like a guess only */
- int isNewRequest = 0
- | !memcmp(buf + app->trspHdrEnd, "GET ", 4)
- | !memcmp(buf + app->trspHdrEnd, "PUT ", 4)
- | !memcmp(buf + app->trspHdrEnd, "POST ", 5)
- | !memcmp(buf + app->trspHdrEnd, "DELETE ", 7)
- ;
- if( isNewRequest ){
- app->httpReq_off = 0;
- }else{
- app->httpReq_off = 42; /*TODO make more accurate*/
- }
-}
-
-
-static void printParsingResults( PcapOne*app, const struct pcap_pkthdr*hdr ){
-
- int isHttpRequest = (app->flg & FLG_isHttpReq);
- int isHttpReqBegin = isHttpRequest && app->httpReq_off == 0;
-
- if( isHttpRequest && isHttpReqBegin ){
- /* find http method */
- const uint8_t *method = app->httpReqHeadline;
- int method_len = 0;
- for(;; ++method_len ){
- if( method_len > app->httpReqHeadline_len ) break;
- if( method[method_len] == ' ' ) break;
- }
- /* find http uri */
- const uint8_t *uri = method + method_len + 1;
- int uri_len = 0;
- for(;; ++uri_len ){
- if( method_len + uri_len > app->httpReqHeadline_len ) break;
- if( uri[uri_len] == ' ' ) break;
- }
- if( !(app->flg & FLG_isHdrPrinted) ){
- app->flg |= FLG_isHdrPrinted;
- printf("h;Title;HTTP requests\n");
- printf("c;epochSec;srcIp;dstIp;srcPort;dstPort;http_method;http_uri\n");
- }
- /* print it as a quick-n-dirty CSV record */
- printf("r;%ld.%06ld;%d.%d.%d.%d;%d.%d.%d.%d;%d;%d;%.*s;%.*s\n",
- hdr->ts.tv_sec, hdr->ts.tv_usec,
- app->ipSrcAddr >> 24, app->ipSrcAddr >> 16 & 0xFF, app->ipSrcAddr >> 8 & 0xFF, app->ipSrcAddr & 0xFF,
- app->ipDstAddr >> 24, app->ipDstAddr >> 16 & 0xFF, app->ipDstAddr >> 8 & 0xFF, app->ipDstAddr & 0xFF,
- app->trspSrcPort, app->trspDstPort,
- method_len, method, uri_len, uri);
- }
-}
-
-
-static int run( PcapOne*app ){
- int err;
- err = pcap_init(PCAP_CHAR_ENC_UTF_8, app->pcapErrbuf);
- if( err == PCAP_ERROR ){
- fprintf(stderr, "libpcap: %s\n", app->pcapErrbuf); err = -1; goto endFn; }
- app->pcap = pcap_open_offline(
- (app->dumpFilePath == DEV_STDIN) ? "-" : app->dumpFilePath,
- app->pcapErrbuf);
- if( app->pcap == NULL ){
- fprintf(stderr, "libpcap: %s\n", app->pcapErrbuf); err = -1; goto endFn; }
- for(;;){
- err = pcap_dispatch(app->pcap, -1, onPcapPkg, (void*)app);
- switch( err ){
- case PCAP_ERROR:
- fprintf(stderr, "pcap_dispatch(): %s\n", pcap_geterr(app->pcap));
- err = -1; goto endFn;
- case PCAP_ERROR_BREAK:
- case PCAP_ERROR_NOT_ACTIVATED:
- fprintf(stderr, "pcap_dispatch() -> %d\n", err);
- err = -1; goto endFn;
- }
- if( err > 0 ){
- fprintf(stderr, "Processed %d packages in this turn.\n", err);
- continue;
- }
- break;
- }
- err = 0;
-endFn:
- if( app->pcap != NULL ){ pcap_close(app->pcap); app->pcap = NULL; }
- return err;
-}
-
-
-int main( int argc, char**argv ){
- int err;
- static char errbuf[PCAP_ERRBUF_SIZE];
- errbuf[0] = '\0';
- PcapOne app = {
- .flg = FLG_INIT,
- .pcapErrbuf = errbuf,
- .pcap = NULL,
- .frameNr = 0,
- .trspBodyLen = 0,
- };
- #define app (&app)
-
- err = parseArgs(app, argc, argv);
- if( err ){ goto endFn; }
-
- if( app->flg & FLG_isHelp ){
- printHelp(); goto endFn; }
-
- err = run(app);
-
-endFn:
- if( err < 0 ) err = -err;
- if( err > 0x7F ) err = 1;
- return err;
- #undef app
-}
-
-
diff --git a/src/main/docker/android-dev.Dockerfile b/src/main/docker/android-dev.Dockerfile
deleted file mode 100644
index 3f7b4b4..0000000
--- a/src/main/docker/android-dev.Dockerfile
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# Tools for Android development.
-#
-
-ARG PARENT_IMAGE=debian:buster-20220622-slim
-FROM $PARENT_IMAGE
-
-ARG PKGS_TO_ADD="curl unzip openjdk-11-jdk-headless aapt apksigner zipalign"
-ARG PKGS_TO_DEL="curl unzip"
-ARG PKGINIT="apt-get update"
-ARG PKGADD="apt-get install -y --no-install-recommends"
-ARG PKGDEL="apt-get purge -y"
-ARG PKGCLEAN="apt-get clean"
-ARG PLATFORM_VERSION="22"
-ARG BUILD_TOOLS_VERSION="22.0.1"
-ARG CMDLINETOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip"
-
-ENV ANDROID_HOME="/usr/lib/android-sdk"
-ENV PATH="$PATH:/usr/lib/android-sdk/build-tools/debian:/usr/lib/android-sdk/cmdline-tools/latest/bin:/usr/lib/android-sdk/build-tools/$BUILD_TOOLS_VERSION"
-
-WORKDIR /work
-
-RUN true \
- && $PKGINIT \
- && $PKGADD $PKGS_TO_ADD \
- && (cd /tmp && curl -sSLO "$CMDLINETOOLS_URL") \
- && if test -x /tmp/cmdline-tools; then echo >&2 "[ERROR] /tmp/cmdline-tools already exists"; false; fi \
- && (cd /tmp && unzip $(basename "$CMDLINETOOLS_URL") >/dev/null) \
- && mkdir /usr/lib/android-sdk/cmdline-tools \
- && mkdir /usr/lib/android-sdk/cmdline-tools/latest \
- && mv /tmp/cmdline-tools/* /usr/lib/android-sdk/cmdline-tools/latest/. \
- && yes | sdkmanager --install "platforms;android-$PLATFORM_VERSION" "build-tools;$BUILD_TOOLS_VERSION" \
- # Those for some reason are broken (wrong linker) so use the debian variant.
- && (cd "/usr/lib/android-sdk/build-tools/${BUILD_TOOLS_VERSION:?}" && rm aapt zipalign) \
- && chown 1000:1000 /work \
- && $PKGDEL $PKGS_TO_DEL \
- && $PKGCLEAN \
- && rm -rf /tmp/* \
- && true
-
-USER 1000:1000
-
-CMD ["sleep", "36000"]
-
diff --git a/src/main/docker/gcc-windoof.Dockerfile b/src/main/docker/gcc-windoof.Dockerfile
deleted file mode 100644
index 69cc18e..0000000
--- a/src/main/docker/gcc-windoof.Dockerfile
+++ /dev/null
@@ -1,233 +0,0 @@
-#
-# Windoof GCC build env
-#
-
-ARG BASE_IMG=alpine:3.16.0
-FROM $BASE_IMG
-
-ARG PKGSTOADD="ca-certificates curl mingw-w64-gcc make tar"
-ARG PKGSTODEL="ca-certificates curl"
-ARG PKGADD="apk add"
-ARG PKGDEL="apk del"
-ARG PKGCLEAN="true"
-ARG PKGINIT="true"
-ARG VERSION_CJSON="1.7.15"
-ARG VERSION_EXPAT="2.4.2"
-ARG VERSION_LUA="5.4.3"
-ARG VERSION_MBEDTLS="3.1.0"
-ARG VERSION_SDL2="2.0.20"
-ARG VERSION_SQLITE="3.33.0"
-ARG VERSION_ZLIB="1.2.11"
-
-ENV NDEBUG=1 MAKE_JOBS=8 HOST=x86_64-w64-mingw32
-
-RUN true \
- && $PKGINIT && $PKGADD $PKGSTOADD \
- #
- && ensureSourceIsCached () { \
- local localPath=${1:?}; \
- local url=${2:?}; \
- if test -f "${localPath:?}"; then \
- echo "[DEBUG] Source avail as \"${localPath:?}\""; \
- return; \
- fi; \
- echo "[DEBUG] Downloading \"${localPath:?}\""; \
- echo "[DEBUG] from \"${url:?}\""; \
- curl -L "$url" -o "${localPath:?}"; \
- } \
- #
- && makeZlib () { echo "\n Build zlib\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir "/tmp/zlib" && cd "/tmp/zlib" \
- && tar xzf "${tarbal:?}" \
- && cd zlib-* \
- && mkdir build \
- && export DESTDIR=./build BINARY_PATH=/bin INCLUDE_PATH=/include LIBRARY_PATH=/lib \
- && sed -i "s;^PREFIX =.\*\$;;" win32/Makefile.gcc \
- && make -e -j$MAKE_JOBS -fwin32/Makefile.gcc PREFIX="${HOST:?}"- \
- && make -e -fwin32/Makefile.gcc install PREFIX="${HOST:?}"- \
- && unset DESTDIR BINARY_PATH INCLUDE_PATH LIBRARY_PATH \
- && cp README build/. \
- && (cd build && rm -rf lib/pkgconfig) \
- && (cd build && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/zlib-${version:?}-windoof.tgz" \
- && cd / && rm -rf "/tmp/zlib" \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f "/tmp/zlib-${version:?}-windoof.tgz" -x include lib \
- && echo -e "\n zlib Done :)\n" \
- && cd "${origDir:?}" ; } \
- && ensureSourceIsCached "/tmp/zlib-${VERSION_ZLIB:?}.tgz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION_ZLIB:?}/zlib-${VERSION_ZLIB}.tar.gz" \
- && makeZlib "${VERSION_ZLIB:?}" "/tmp/zlib-${VERSION_ZLIB:?}.tgz" \
- #
- && $PKGADD xz \
- && makeExpat () { echo -e "\n Build Expat\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/expat && cd /tmp/expat \
- && tar xf "${tarbal:?}" --strip-components=1 \
- && mkdir build \
- && ./configure --prefix="${PWD:?}/build" --host="${HOST:?}" CFLAGS="-Wall -pedantic --std=c99 -O2" \
- && make -e clean \
- && make -e -j$MAKE_JOBS \
- && make -e install \
- && cp README.md build/. \
- && (cd build && rm -rf lib/cmake lib/libexpat.la lib/pkgconfig) \
- && (cd build && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/expat-${version:?}-debian.tgz" \
- && cd / && rm -rf /tmp/expat \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/expat-2.4.2-debian.tgz -x bin include lib \
- && echo -e "\n Expat Done :)\n" ; } \
- && ensureSourceIsCached "/tmp/expat-${VERSION_EXPAT}.txz" "https://github.com/libexpat/libexpat/releases/download/R_2_4_2/expat-${VERSION_EXPAT}.tar.xz" \
- && makeExpat "${VERSION_EXPAT:?}" "/tmp/expat-${VERSION_EXPAT}.txz" \
- #
- && makeCJSON () { echo -e "\n Build cJSON\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/cJSON && cd /tmp/cJSON \
- && tar xf "${tarbal:?}" \
- && cd * \
- && mkdir build build/obj build/lib build/include \
- && CC="${HOST:?}-gcc" \
- && AR="${HOST:?}-ar" \
- && CFLAGS="-Wall -pedantic -fPIC" \
- && ${CC:?} $CFLAGS -c -o build/obj/cJSON.o cJSON.c \
- && ${CC:?} $CFLAGS -shared -o build/lib/libcJSON.so.1.7.15 build/obj/cJSON.o \
- && (cd build/lib && ln -s libcJSON.so."${version:?}" libcJSON.so."${version%.*}") \
- && (cd build/lib && ln -s libcJSON.so."${version%.*}" libcJSON.so."${version%.*.*}") \
- && ${AR:?} rcs build/lib/libcJSON.a build/obj/cJSON.o \
- && unset CC AR CFLAGS \
- && cp -t build/. LICENSE README.md \
- && cp -t build/include/. cJSON.h \
- && rm -rf build/obj \
- && (cd build && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -f "/tmp/cJSON-${version:?}-debian.tgz" -cz *) \
- && cd / && rm -rf /tmp/cJSON \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/cJSON-${version:?}-debian.tgz -x include lib \
- && echo -e "\n cJSON Done :)\n"; } \
- && ensureSourceIsCached "/tmp/cJSON-${VERSION_CJSON:?}.tgz" "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.15.tar.gz" \
- && makeCJSON "${VERSION_CJSON:?}" "/tmp/cJSON-${VERSION_CJSON:?}.tgz" \
- #
- && $PKGADD python3 \
- && makeMbedtls () { echo -e "\n Build mbedtls\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/mbedtls && cd /tmp/mbedtls \
- && tar xf "${tarbal:?}" \
- && cd * \
- && sed -i 's;^DESTDIR=.*$;DESTDIR='"$PWD"'/build;' Makefile \
- # Yet another hack around as gethostname seems not to exist and I do
- # not understand how to disable compiling those "programs" which I
- # do not want anyway.
- && rm programs/ssl/ssl_mail_client.c programs/test/udp_proxy.c \
- && sed -i '/^\t\+\(ssl\/ssl_mail_client\|test\/udp_proxy\) \+\\$/d' programs/Makefile \
- && sed -i '/^ \+ssl_mail_client$/d' programs/ssl/CMakeLists.txt \
- && export CC="${HOST:?}-gcc" AR="${HOST:?}-ar" WINDOWS_BUILD=1 SHARED=1 \
- && make -e -j$MAKE_JOBS no_test \
- && if [ -e build ]; then echo "ERR already exists: $PWD/build"; false; fi \
- && make -e install \
- && unset CC AR WINDOWS_BUILD SHARED \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/mbedtls-${version:?}-windoof.tgz" \
- && cd / && rm -rf /tmp/mbedtls \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/mbedtls-${version:?}-windoof.tgz -x bin include lib \
- && cd "${origDir:?}" \
- && echo -e "\n mbedtls Done :)\n" ; } \
- && ensureSourceIsCached "/tmp/mbedtls-${VERSION_MBEDTLS:?}.tgz" "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${VERSION_MBEDTLS:?}.tar.gz" \
- && makeMbedtls "${VERSION_MBEDTLS:?}" "/tmp/mbedtls-${VERSION_MBEDTLS:?}.tgz" \
- #
- && makeSqLite () { echo -e "\n Build SqLite\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/sqlite && cd /tmp/sqlite \
- && tar xf "${tarbal:?}" \
- && cd * \
- && mkdir build \
- && $PKGADD gcc musl-dev tcl \
- && export CC="${HOST}-gcc" CPP="${HOST:?}-cpp" CXX="${HOST:?}-g++" BCC=gcc \
- && ./configure --prefix="${PWD:?}/build" --host=$HOST CC=$CC CPP=$CPP CXX=$CXX BCC=gcc BEXE=.exe config_TARGET_EXEEXT=.exe \
- && ln -s mksourceid.exe mksourceid \
- && make -e clean \
- && make -e -j$MAKE_JOBS \
- && $PKGDEL gcc musl-dev tcl \
- && make -e install \
- && unset CC CPP CXX BCC \
- && (cd build && rm -rf lemon* mksourceid lib/pkgconfig lib/*.la) \
- && cp README.md LICENSE.md VERSION build/. \
- && (cd build && find -not -name MD5SUM -type f -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/sqlite-3.33.0-windoof.tgz" \
- && cd / && rm -rf /tmp/sqlite \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/sqlite-${version:?}-windoof.tgz -x bin include lib \
- && cd "$origDir" \
- && echo -e "\n SqLite Done :)\n"; } \
- && ensureSourceIsCached "/tmp/sqlite-${VERSION_SQLITE:?}.tgz" "https://github.com/sqlite/sqlite/archive/refs/tags/version-3.33.0.tar.gz" \
- && makeSqLite "${VERSION_SQLITE:?}" "/tmp/sqlite-${VERSION_SQLITE:?}.tgz" \
- #
- && $PKGADD binutils \
- && makeLua () { echo -e "\n Build Lua\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/lua && cd /tmp/lua \
- && tar xf "${tarbal:?}" \
- && cd * \
- && mkdir -p build/bin build/include build/lib build/man/man1 \
- && make -e -j$MAKE_JOBS PLAT=mingw CC="${HOST:?}-gcc -std=gnu99" "AR=${HOST:?}-ar rcu" "RANLIB=${HOST:?}-ranlib" \
- && cp -t build/. README \
- && cp -t build/bin/. src/lua.exe src/luac.exe \
- && cp -t build/include/. src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h src/lua.hpp \
- && cp -t build/lib/. src/liblua.a \
- && cp -t build/man/man1/. doc/lua.1 doc/luac.1 \
- && (cd build && find -not -name MD5SUM -type f -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/lua-${version:?}-windoof.tgz" \
- && cd / && rm -rf /tmp/lua \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/lua-${version:?}-windoof.tgz -x bin include lib man \
- && cd "$origDir" \
- && echo -e "\n Lua Done :)\n"; } \
- && ensureSourceIsCached "/tmp/lua-${VERSION_LUA:?}.tgz" "https://www.lua.org/ftp/lua-${VERSION_LUA:?}.tar.gz" \
- && makeLua "${VERSION_LUA:?}" "/tmp/lua-${VERSION_LUA:?}.tgz" \
- #
- && $PKGADD alsa-lib libxext-dev pulseaudio-dev \
- && makeSDL2 () { echo -e "\n Build SDL2\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/SDL2 && cd /tmp/SDL2 \
- && tar xf "${tarbal:?}" \
- && cd * \
- && ./configure --prefix="${PWD:?}/build" --host="${HOST:?}" \
- && make -e -j$MAKE_JOBS \
- && make -e install \
- && cp -t build/. CREDITS.txt LICENSE.txt README-SDL.txt README.md \
- && (cd build \
- && ls -A \
- | egrep -v '^(CREDITS.txt|LICENSE.txt|README-SDL.txt|RADME.md|bin|lib|include)$' \
- | xargs rm -rf) \
- && (cd build && rm -rf lib/cmake lib/pkgconfig lib/*.la) \
- && (cd build && find -type f -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/SDL2-${version:?}-windoof.tgz" \
- && cd / && rm -rf /tmp/SDL2 \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/SDL2-${version:?}-windoof.tgz -x include lib \
- && cd "$origDir" \
- && echo -e "\n SDL2 Done :)\n"; } \
- && ensureSourceIsCached "/tmp/SDL2-${VERSION_SDL2:?}.tgz" "https://www.libsdl.org/release/SDL2-${VERSION_SDL2}.tar.gz" \
- && makeSDL2 "${VERSION_SDL2:?}" "/tmp/SDL2-${VERSION_SDL2:?}.tgz" \
- #
- && $PKGDEL $PKGSTODEL && $PKGCLEAN \
- && true
-
-WORKDIR /work
-
-CMD sleep 999999999
-
-
diff --git a/src/main/docker/gcc.Dockerfile b/src/main/docker/gcc.Dockerfile
deleted file mode 100644
index 5894667..0000000
--- a/src/main/docker/gcc.Dockerfile
+++ /dev/null
@@ -1,220 +0,0 @@
-#
-# Debian GCC build env
-#
-
-ARG BASE_IMG=debian:9-slim
-FROM $BASE_IMG
-
-ARG PKGSTOADD="ca-certificates curl gcc make tar"
-ARG PKGSTODEL="ca-certificates curl"
-ARG PKGADD="apt-get install -y --no-install-recommends"
-ARG PKGDEL="apt-get purge -y"
-ARG PKGCLEAN="apt-get clean"
-ARG PKGINIT="apt-get update"
-ARG VERSION_CJSON="1.7.15"
-ARG VERSION_EXPAT="2.4.2"
-ARG VERSION_LUA="5.4.3"
-ARG VERSION_MBEDTLS="3.1.0"
-ARG VERSION_SDL2="2.0.20"
-ARG VERSION_SQLITE="3.33.0"
-ARG VERSION_ZLIB="1.2.11"
-
-ENV NDEBUG=1 MAKE_JOBS=8
-
-RUN true \
- && $PKGINIT && $PKGADD $PKGSTOADD \
- #
- && ensureSourceIsCached () { \
- local localPath=${1:?}; \
- local url=${2:?}; \
- if test -f "${localPath:?}"; then \
- echo "[DEBUG] Source avail as \"${localPath:?}\""; \
- return; \
- fi; \
- echo "[DEBUG] Downloading \"${localPath:?}\""; \
- echo "[DEBUG] from \"${url:?}\""; \
- curl -L "$url" -o "${localPath:?}"; \
- } \
- #
- && $PKGADD libc-dev \
- && makeZlib () { echo "\n Build zlib\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir "/tmp/zlib" && cd "/tmp/zlib" \
- && tar xzf "${tarbal:?}" \
- && cd zlib-* \
- && mkdir build \
- && ./configure --prefix="${PWD:?}/build/" \
- && make -e -j$MAKE_JOBS \
- && make install \
- && cp README build/. \
- && (cd build \
- && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/zlib-${version:?}-debian.tgz" \
- && cd / && rm -rf "/tmp/zlib" \
- && mkdir -p /usr/local/ \
- && tar -C /usr/local -f "/tmp/zlib-${version:?}-debian.tgz" -x include lib \
- && cd "${origDir:?}" \
- && echo -e "\n zlib Done :)\n" ; } \
- && ensureSourceIsCached "/tmp/zlib-${VERSION_ZLIB:?}.tgz" "https://downloads.sourceforge.net/project/libpng/zlib/${VERSION_ZLIB:?}/zlib-${VERSION_ZLIB}.tar.gz" \
- && makeZlib "${VERSION_ZLIB:?}" "/tmp/zlib-${VERSION_ZLIB:?}.tgz" \
- #
- && $PKGADD libc-dev xz-utils \
- && makeExpat () { echo -e "\n Build Expat\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/expat && cd /tmp/expat \
- && tar xf "${tarbal:?}" --strip-components=1 \
- && mkdir build \
- && ./configure --prefix="${PWD:?}/build" CFLAGS='-Wall -pedantic --std=c99 -O2' \
- && make -e clean \
- && make -e -j$MAKE_JOBS \
- && make -e install \
- && cp README.md build/. \
- && (cd build && rm -rf lib/cmake lib/libexpat.la lib/pkgconfig) \
- && (cd build && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/expat-${version:?}-debian.tgz" \
- && cd / && rm -rf /tmp/expat \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/expat-2.4.2-debian.tgz -x bin include lib \
- && cd "$origDir" \
- && echo -e "\n Expat Done :)\n" ; } \
- && ensureSourceIsCached "/tmp/expat-${VERSION_EXPAT}.txz" "https://github.com/libexpat/libexpat/releases/download/R_2_4_2/expat-${VERSION_EXPAT}.tar.xz" \
- && makeExpat "${VERSION_EXPAT:?}" "/tmp/expat-${VERSION_EXPAT}.txz" \
- #
- && $PKGADD libc-dev \
- && makeCJSON () { echo -e "\n Build cJSON\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/cJSON && cd /tmp/cJSON \
- && tar xf "${tarbal:?}" \
- && cd * \
- && mkdir build build/obj build/lib build/include \
- && CFLAGS="-Wall -pedantic -fPIC" \
- && gcc $CFLAGS -c -o build/obj/cJSON.o cJSON.c \
- && gcc $CFLAGS -shared -o build/lib/libcJSON.so.1.7.15 build/obj/cJSON.o \
- && unset CFLAGS \
- && (cd build/lib && ln -s libcJSON.so."${version:?}" libcJSON.so."${version%.*}") \
- && (cd build/lib && ln -s libcJSON.so."${version%.*}" libcJSON.so."${version%.*.*}") \
- && ar rcs build/lib/libcJSON.a build/obj/cJSON.o \
- && cp -t build/. LICENSE README.md \
- && cp -t build/include/. cJSON.h \
- && rm -rf build/obj \
- && (cd build && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -f "/tmp/cJSON-${version:?}-debian.tgz" -cz *) \
- && cd / && rm -rf /tmp/cJSON \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/cJSON-${version:?}-debian.tgz -x include lib \
- && cd "$origDir" \
- && echo -e "\n cJSON Done :)\n"; } \
- && ensureSourceIsCached "/tmp/cJSON-${VERSION_CJSON:?}.tgz" "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.15.tar.gz" \
- && makeCJSON "${VERSION_CJSON}" "/tmp/cJSON-${VERSION_CJSON:?}.tgz" \
- #
- && $PKGADD libc-dev python3 \
- && makeMbedtls () { echo -e "\n Build mbedtls\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/mbedtls && cd /tmp/mbedtls \
- && tar xf "${tarbal:?}" \
- && cd * \
- && sed -i 's;^DESTDIR=.*$;DESTDIR='"$PWD"'/build;' Makefile \
- && SHARED=1 make -e -j$MAKE_JOBS tests lib mbedtls_test \
- && if [ -e build ]; then echo "ERR already exists: $PWD/build"; false; fi \
- && make -e install \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/mbedtls-${version:?}-debian.tgz" \
- && cd / && rm -rf /tmp/mbedtls \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/mbedtls-${version:?}-debian.tgz -x bin include lib \
- && cd "$origDir" \
- && echo -e "\n mbedtls Done :)\n"; } \
- && ensureSourceIsCached "/tmp/mbedtls-${VERSION_MBEDTLS:?}.tgz" "https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${VERSION_MBEDTLS:?}.tar.gz" \
- && makeMbedtls "${VERSION_MBEDTLS:?}" "/tmp/mbedtls-${VERSION_MBEDTLS:?}.tgz" \
- #
- && $PKGADD libc-dev tcl \
- && makeSqLite () { echo -e "\n Build SqLite\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/sqlite && cd /tmp/sqlite \
- && tar xf "${tarbal:?}" \
- && cd * \
- && mkdir build \
- && ./configure --prefix="${PWD:?}/build" \
- && make -e clean \
- && make -e -j$MAKE_JOBS \
- && make -e install \
- && cp README.md LICENSE.md VERSION build/. \
- && (cd build && find -not -name MD5SUM -type f -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/sqlite-${version:?}-debian.tgz" \
- && cd / && rm -rf /tmp/sqlite \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/sqlite-${version:?}-debian.tgz -x bin include lib \
- && cd "$origDir" \
- && echo -e "\n SqLite Done :)\n"; } \
- && ensureSourceIsCached "/tmp/sqlite-${VERSION_SQLITE:?}.tgz" "https://github.com/sqlite/sqlite/archive/refs/tags/version-3.33.0.tar.gz" \
- && makeSqLite "${VERSION_SQLITE:?}" "/tmp/sqlite-${VERSION_SQLITE:?}.tgz" \
- #
- && $PKGADD libc-dev \
- && makeLua () { echo -e "\n Build Lua\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/lua && cd /tmp/lua \
- && tar xf "${tarbal:?}" \
- && cd * \
- && mkdir -p build/bin build/include build/lib build/man/man1 \
- && make -e -j$MAKE_JOBS \
- && cp -t build/. README \
- && cp -t build/bin/. src/lua src/luac \
- && cp -t build/include/. src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h src/lua.hpp \
- && cp -t build/lib/. src/liblua.a \
- && cp -t build/man/man1/. doc/lua.1 doc/luac.1 \
- && (cd build && find -not -name MD5SUM -type f -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/lua-${version:?}-debian.tgz" \
- && cd / && rm -rf /tmp/lua \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/lua-${version:?}-debian.tgz -x bin include lib man \
- && cd "$origDir" \
- && echo -e "\n Lua Done :)\n"; } \
- && ensureSourceIsCached "/tmp/lua-${VERSION_LUA:?}.tgz" "https://www.lua.org/ftp/lua-${VERSION_LUA:?}.tar.gz" \
- && makeLua "${VERSION_LUA:?}" "/tmp/lua-${VERSION_LUA:?}.tgz" \
- #
- && $PKGADD libc-dev libasound2-dev libxext-dev libpulse-dev \
- && makeSDL2 () { echo -e "\n Build SDL2\n" \
- && local version="${1:?}" \
- && local tarbal="${2:?}" \
- && local origDir="${PWD:?}" \
- && mkdir /tmp/SDL2 && cd /tmp/SDL2 \
- && tar xf "${tarbal:?}" \
- && cd * \
- && ./configure --prefix="${PWD:?}/build" --host= \
- && make -e -j$MAKE_JOBS \
- && make -e install \
- && cp -t build/. CREDITS.txt LICENSE.txt README-SDL.txt README.md \
- && (cd build \
- && ls -A \
- | egrep -v '^(CREDITS.txt|LICENSE.txt|README-SDL.txt|RADME.md|bin|lib|include)$' \
- | xargs rm -rf) \
- && (cd build && rm -rf lib/cmake lib/pkgconfig lib/*.la) \
- && (cd build && find -type f -exec md5sum -b {} + > MD5SUM) \
- && (cd build && tar --owner=0 --group=0 -cz *) > "/tmp/SDL2-${version:?}-debian.tgz" \
- && cd / && rm -rf /tmp/SDL2 \
- && mkdir -p /usr/local \
- && tar -C /usr/local -f /tmp/SDL2-${version:?}-debian.tgz -x include lib \
- && cd "$origDir" \
- && echo -e "\n SDL2 Done :)\n"; } \
- && ensureSourceIsCached "/tmp/SDL2-${VERSION_SDL2:?}.tgz" "https://www.libsdl.org/release/SDL2-${VERSION_SDL2}.tar.gz" \
- && makeSDL2 "${VERSION_SDL2:?}" "/tmp/SDL2-${VERSION_SDL2:?}.tgz" \
- #
- && $PKGDEL $PKGSTODEL && $PKGCLEAN \
- && true
-
-WORKDIR /work
-
-CMD sleep 999999999
-
-
diff --git a/src/main/docker/gxx.Dockerfile b/src/main/docker/gxx.Dockerfile
deleted file mode 100644
index f29f168..0000000
--- a/src/main/docker/gxx.Dockerfile
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Debian with C++ compiler.
-#
-
-ARG PARENT_IMAGE=debian:buster-20220622-slim
-FROM $PARENT_IMAGE
-
-RUN true \
- && apt update \
- && apt install -y --no-install-recommends \
- g++ make \
- && apt clean \
- && true
-
-USER 1000:1000
-WORKDIR /work
-CMD ["sleep", "36000"]
diff --git a/src/main/docker/jni.Dockerfile b/src/main/docker/jni.Dockerfile
deleted file mode 100644
index c790e47..0000000
--- a/src/main/docker/jni.Dockerfile
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Debian with tools for java-native-interface development.
-#
-
-ARG PARENT_IMAGE=debian:buster-20220622-slim
-FROM $PARENT_IMAGE
-
-ENV \
- JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
-
-RUN true \
- && apt update \
- && apt install -y --no-install-recommends \
- g++ make openjdk-11-jdk-headless \
- && apt clean \
- && true
-
-USER 1000:1000
-WORKDIR /work
-CMD ["sleep", "36000"]
diff --git a/src/main/docker/jre8.Dockerfile b/src/main/docker/jre8.Dockerfile
deleted file mode 100644
index 603b5f5..0000000
--- a/src/main/docker/jre8.Dockerfile
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# openjdk java 1.8 runtime environment.
-#
-
-ARG PARENT_IMAGE=alpine:3.16.0
-FROM $PARENT_IMAGE
-
-ARG PKGS_TO_ADD="openjdk8-jre"
-ARG PKGS_TO_DEL=""
-ARG PKGINIT="true"
-ARG PKGADD="apk add"
-ARG PKGDEL="true"
-ARG PKGCLEAN="true"
-
-WORKDIR /work
-
-RUN true \
- && $PKGINIT \
- && $PKGADD $PKGS_TO_ADD \
- && $PKGDEL $PKGS_TO_DEL \
- && $PKGCLEAN \
- && true
-
-USER 1000:1000
-
-CMD ["sleep", "36000"]
-
diff --git a/src/main/docker/maven.Dockerfile b/src/main/docker/maven.Dockerfile
deleted file mode 100644
index c33d519..0000000
--- a/src/main/docker/maven.Dockerfile
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Maven build env.
-#
-# Use this to share your hosts repository with the container:
-#
-# -v "$HOME/.m2/repository:/data/maven/.m2/repository"
-#
-
-ARG PARENT_IMAGE=alpine:3.16.0
-FROM $PARENT_IMAGE
-
-ARG PKGS_TO_ADD="maven"
-ARG PKGS_TO_DEL=""
-ARG PKGINIT="true"
-ARG PKGADD="apk add"
-ARG PKGDEL="true"
-ARG PKGCLEAN="true"
-
-WORKDIR /work
-
-RUN true \
- && $PKGINIT \
- && $PKGADD $PKGS_TO_ADD \
- && sed -i "s,</settings>, <localRepository>/data/maven/.m2/repository</localRepository>\n</settings>,g" /usr/share/java/maven-3/conf/settings.xml \
- && mkdir /data /data/maven \
- && chown 1000:1000 /data/maven \
- && chown 1000:1000 /work \
- && $PKGDEL $PKGS_TO_DEL \
- && $PKGCLEAN \
- && true
-
-USER 1000:1000
-
-CMD ["sleep", "36000"]
-
diff --git a/src/main/docker/nginx.Dockerfile b/src/main/docker/nginx.Dockerfile
deleted file mode 100644
index 097d283..0000000
--- a/src/main/docker/nginx.Dockerfile
+++ /dev/null
@@ -1,50 +0,0 @@
-#
-# Bare nginx server serving HTTP/80 and HTTPS/443 from "/work/www".
-#
-
-ARG PARENT_IMAGE=alpine:3.16.0
-FROM $PARENT_IMAGE
-
-ARG CN=example.com
-ARG PKGS_TO_ADD="nginx openssl"
-ARG PKGS_TO_DEL="openssl"
-ARG PKGINIT="true"
-ARG PKGADD="apk add"
-ARG PKGDEL="true"
-ARG PKGCLEAN="true"
-
-WORKDIR /work
-
-RUN true \
- && $PKGINIT \
- && $PKGADD $PKGS_TO_ADD \
- && mkdir /work/www \
- && openssl genrsa -out /etc/ssl/private/nginx.key 2048 \
- && openssl req -new -key /etc/ssl/private/nginx.key \
- -out /etc/ssl/private/nginx.csr \
- -subj "/C=/ST=/L=/O=/OU=/CN=${CN:?}" \
- && openssl x509 -req -days 365 -in /etc/ssl/private/nginx.csr \
- -signkey /etc/ssl/private/nginx.key -out /etc/ssl/certs/nginx.crt \
- && chgrp nginx /etc/ssl/private/nginx.key \
- && chmod 0640 /etc/ssl/private/nginx.key \
- && printf 'server {\n\
- listen 80 default_server;\n\
- listen [::]:80 default_server;\n\
- listen 443 ssl default_server;\n\
- listen [::]:443 default_server;\n\
- ssl_certificate /etc/ssl/certs/nginx.crt;\n\
- ssl_certificate_key /etc/ssl/private/nginx.key;\n\
- location / {\n\
- root /work/www;\n\
- index index.html index.htm;\n\
- }\n\
-}\n' > /etc/nginx/http.d/default.conf \
- && chown nginx:nginx /work /work/www \
- && $PKGDEL $PKGS_TO_DEL \
- && $PKGCLEAN \
- && true
-
-USER nginx:nginx
-
-CMD ["nginx", "-g", "daemon off;"]
-
diff --git a/src/main/docker/zlib-deb.Dockerfile b/src/main/docker/zlib-deb.Dockerfile
deleted file mode 100644
index c5abaf6..0000000
--- a/src/main/docker/zlib-deb.Dockerfile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# curl -sSL "https://git.hiddenalpha.ch/UnspecifiedGarbage.git/plain/src/main/docker/zlib-deb.Dockerfile" | docker build -f- . -t "zlib-deb:$(date +%Y%m%d)"
-#
-ARG PARENT_IMAGE=debian:9-slim
-FROM $PARENT_IMAGE
-
-ARG ZLIB_VERSION="1.2.11"
-ARG PKGS_TO_ADD="curl gcc make tar libc-dev ca-certificates vim"
-ARG PKGS_TO_DEL=""
-ARG PKG_INIT="apt-get update"
-ARG PKG_ADD="apt-get install -y --no-install-recommends"
-ARG PKG_DEL="apt-get purge"
-ARG PKG_CLEAN="apt-get clean"
-
-RUN true \
- && WORKDIR="/work" \
- && THEOLDPWD="$PWD" \
- # Prepare System
- && $PKG_INIT \
- && $PKG_ADD $PKGS_TO_ADD \
- # Prepare zlib
- && mkdir "${WORKDIR:?}" && cd "${WORKDIR:?}" \
- && mkdir tarballs tree build \
- && curl -sSL -o "tarballs/zlib-${ZLIB_VERSION}.tgz" "https://github.com/madler/zlib/archive/refs/tags/v${ZLIB_VERSION:?}.tar.gz" \
- && cd "${WORKDIR:?}/tree" \
- && tar --strip-components 1 -xzf "${WORKDIR:?}/tarballs/zlib-${ZLIB_VERSION:?}.tgz" \
- # Make zlib
- && ./configure --prefix="${WORKDIR:?}/build" \
- && make -e \
- && make install \
- && cp README "${WORKDIR}/build/." \
- && cd "${WORKDIR}/build" \
- && rm -rf lib/pkgconfig \
- && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM \
- && tar --owner=0 --group=0 -cz * > "${WORKDIR:?}/tarballs/zlib-${ZLIB_VERSION:?}-debian.tgz" \
- && cd "${WORKDIR}" \
- && rm -rf "${WORKDIR:?}/tree" "${WORKDIR:?}/build" \
- # install zlib
- && mkdir -p /usr/local/ \
- && tar -C /usr/local -f "${WORKDIR:?}/tarballs/zlib-${ZLIB_VERSION:?}-debian.tgz" -x include lib \
- # cleanup
- && cd "${THEOLDPWD:?}" \
- && unset THEOLDPWD WORKDIR \
- && $PKG_DEL $PKGS_TO_DEL \
- && $PKG_CLEAN \
- && true
-
-WORKDIR /work
-
diff --git a/src/main/docker/zlib-mingw.Dockerfile b/src/main/docker/zlib-mingw.Dockerfile
deleted file mode 100644
index abaa241..0000000
--- a/src/main/docker/zlib-mingw.Dockerfile
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# curl -sSL "https://git.hiddenalpha.ch/UnspecifiedGarbage.git/plain/src/main/docker/zlib-mingw.Dockerfile" | docker build -f- . -t "zlib-deb:$(date +%Y%m%d)"
-#
-ARG PARENT_IMAGE=alpine:3.16.0
-FROM $PARENT_IMAGE
-
-ARG ZLIB_VERSION="1.2.11"
-ARG PKGS_TO_ADD="curl mingw-w64-gcc make tar ca-certificates"
-ARG PKGS_TO_DEL=""
-ARG PKG_INIT="true"
-ARG PKG_ADD="apk add "
-ARG PKG_DEL="apk del"
-ARG PKG_CLEAN="true"
-
-RUN true \
- && WORKDIR="/work" \
- && THEOLDPWD="$PWD" \
- # Prepare System
- && $PKG_INIT \
- && $PKG_ADD $PKGS_TO_ADD \
- # Prepare zlib
- && mkdir "${WORKDIR:?}" && cd "${WORKDIR:?}" \
- && mkdir tarballs tree build \
- && curl -sSL -o "tarballs/zlib-${ZLIB_VERSION}.tgz" "https://github.com/madler/zlib/archive/refs/tags/v${ZLIB_VERSION:?}.tar.gz" \
- && cd "${WORKDIR:?}/tree" \
- && tar --strip-components 1 -xzf "${WORKDIR:?}/tarballs/zlib-${ZLIB_VERSION:?}.tgz" \
- # Make zlib
- && sed -i "s;^PREFIX =.\*\$;;" win32/Makefile.gcc \
- && export DESTDIR=../build BINARY_PATH=/bin INCLUDE_PATH=/include LIBRARY_PATH=/lib \
- && make -e -fwin32/Makefile.gcc PREFIX=x86_64-w64-mingw32- \
- && make -e -fwin32/Makefile.gcc install PREFIX=x86_64-w64-mingw32- \
- && unset DESTDIR BINARY_PATH INCLUDE_PATH LIBRARY_PATH \
- && cp README ../build/. \
- && cd "${WORKDIR:?}/build" \
- && rm -rf lib/pkgconfig \
- && find -type f -not -name MD5SUM -exec md5sum -b {} + > MD5SUM \
- && tar --owner=0 --group=0 -cz * > "${WORKDIR:?}/tarballs/zlib-1.2.11-windoof.tgz" \
- && cd "${WORKDIR:?}" \
- && rm -rf "${WORKDIR:?}/tree" "${WORKDIR:?}/build" \
- # Install zlib
- && mkdir -p /usr/local/x86_64-w64-mingw32 \
- && tar -C /usr/x86_64-w64-mingw32 -f "${WORKDIR:?}/tarballs/zlib-1.2.11-windoof.tgz" -x include lib \
- && cd "${THEOLDPWD:?}" \
- && unset THEOLDPWD WORKDIR \
- && $PKG_DEL $PKGS_TO_DEL \
- && $PKG_CLEAN \
- && true
-
-WORKDIR /work
-
-