Skip to content

Commit b291b77

Browse files
authored
Switch to Ubuntu for now
1 parent 4582dfa commit b291b77

File tree

2 files changed

+8
-27
lines changed

2 files changed

+8
-27
lines changed

Dockerfile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
1-
FROM --platform=$TARGETOS/$TARGETARCH alpine AS curl
1+
FROM --platform=$TARGETOS/$TARGETARCH debian AS curl
22

33
# Install build dependencies
4-
RUN apk add openssl-dev make g++ curl
4+
RUN apt update && apt install libssl-dev make g++ curl -y
55

66
# Download curl source from https://curl.se/download/
77
RUN curl -o curl.tgz https://curl.se/download/curl-8.5.0.tar.gz
88

99
# Unpack
10-
RUN tar xzvf curl.tgz --strip-components=1
10+
RUN tar xzvf curl.tgz
1111

12-
# Configure
13-
RUN ./configure --with-openssl --enable-websockets
12+
# Build
13+
RUN cd curl-*/ && \
14+
./configure --with-openssl --enable-websockets && \
15+
make && make install
1416

15-
# Compile
16-
RUN make && make install
17-
18-
FROM --platform=$TARGETOS/$TARGETARCH alpine
17+
FROM --platform=$TARGETOS/$TARGETARCH debian
1918

2019
LABEL org.opencontainers.image.source="https://github.com/kordlib/docker"
2120
LABEL org.opencontainers.image.licenses=MIT
2221

23-
# See https://youtrack.jetbrains.com/issue/KT-38876/#focus=Comments-27-4805258.0-0
24-
RUN apk add gcompat
2522
# https://github.com/ktorio/ktor/blob/6265a80481d77cdbb2ff7950750e8ee5aa085813/ktor-client/ktor-client-curl/desktop/interop/libcurl.def#L28C32-L28C42
2623
COPY --from=curl /usr/local/lib/libcurl.a /usr/lib/libcurl.a
2724
COPY --from=curl /usr/local/lib/libcurl.la /usr/lib/libcurl.la

README.md

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@ Docker base images for running Kord Native applications
44

55
This image can be used as a base for the upcoming Kord Native target, please read kordlib/kord#69 for more information
66

7-
# Configure for proper compilation
8-
9-
Since the images are alpine based you need to configure your compilation accordingly.
10-
Please also read [KT-38876](https://youtrack.jetbrains.com/issue/KT-38876/#focus=Comments-27-4805258.0-0) for more information
11-
12-
```kotlin
13-
kotlin {
14-
linuxX64 {
15-
binaries.executable {
16-
linkerOpts("--as-needed", "--defsym=isnan=isnan")
17-
freeCompilerArgs = freeCompilerArgs + listOf("-Xoverride-konan-properties=linkerGccFlags=-lgcc -lgcc_eh -lc")
18-
}
19-
}
20-
}
21-
```
22-
237
# Example Usage
248
```Dockerfile
259
FROM ghcr.io/kordlib/docker:main

0 commit comments

Comments
 (0)