From b291b774f2bbbb10c268fcf216f43c33be182ffe Mon Sep 17 00:00:00 2001 From: Michael Rittmeister Date: Fri, 1 Mar 2024 21:56:46 +0100 Subject: [PATCH] Switch to Ubuntu for now --- Dockerfile | 19 ++++++++----------- README.md | 16 ---------------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4059989..afa05e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,24 @@ -FROM --platform=$TARGETOS/$TARGETARCH alpine AS curl +FROM --platform=$TARGETOS/$TARGETARCH debian AS curl # Install build dependencies -RUN apk add openssl-dev make g++ curl +RUN apt update && apt install libssl-dev make g++ curl -y # Download curl source from https://curl.se/download/ RUN curl -o curl.tgz https://curl.se/download/curl-8.5.0.tar.gz # Unpack -RUN tar xzvf curl.tgz --strip-components=1 +RUN tar xzvf curl.tgz -# Configure -RUN ./configure --with-openssl --enable-websockets +# Build +RUN cd curl-*/ && \ + ./configure --with-openssl --enable-websockets && \ + make && make install -# Compile -RUN make && make install - -FROM --platform=$TARGETOS/$TARGETARCH alpine +FROM --platform=$TARGETOS/$TARGETARCH debian LABEL org.opencontainers.image.source="https://github.com/kordlib/docker" LABEL org.opencontainers.image.licenses=MIT -# See https://youtrack.jetbrains.com/issue/KT-38876/#focus=Comments-27-4805258.0-0 -RUN apk add gcompat # https://github.com/ktorio/ktor/blob/6265a80481d77cdbb2ff7950750e8ee5aa085813/ktor-client/ktor-client-curl/desktop/interop/libcurl.def#L28C32-L28C42 COPY --from=curl /usr/local/lib/libcurl.a /usr/lib/libcurl.a COPY --from=curl /usr/local/lib/libcurl.la /usr/lib/libcurl.la diff --git a/README.md b/README.md index c2726dc..3307a92 100644 --- a/README.md +++ b/README.md @@ -4,22 +4,6 @@ Docker base images for running Kord Native applications This image can be used as a base for the upcoming Kord Native target, please read kordlib/kord#69 for more information -# Configure for proper compilation - -Since the images are alpine based you need to configure your compilation accordingly. -Please also read [KT-38876](https://youtrack.jetbrains.com/issue/KT-38876/#focus=Comments-27-4805258.0-0) for more information - -```kotlin -kotlin { - linuxX64 { - binaries.executable { - linkerOpts("--as-needed", "--defsym=isnan=isnan") - freeCompilerArgs = freeCompilerArgs + listOf("-Xoverride-konan-properties=linkerGccFlags=-lgcc -lgcc_eh -lc") - } - } -} -``` - # Example Usage ```Dockerfile FROM ghcr.io/kordlib/docker:main