diff --git a/Dockerfile b/Dockerfile index e513ba0..e909990 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM nimlang/nim:alpine as builder -RUN apk update && apk add git build-base curl bash openssl openssl-dev openssl-libs-static sqlite-dev sqlite-static +RUN apk update && apk add git build-base llvm llvm-dev curl bash openssl openssl-dev openssl-libs-static sqlite-dev sqlite-static COPY . /app WORKDIR /app @@ -8,6 +8,7 @@ WORKDIR /app # Build with necessary params to enable statically linking openssl, glibc and sqlite3 RUN nimble build --passL:-L/usr/lib \ -d:ssl \ + --cc:clang \ -p:. \ --dynlibOverride:ssl \ --dynlibOverride:crypto \ @@ -16,6 +17,7 @@ RUN nimble build --passL:-L/usr/lib \ --passl:-lsqlite3 \ --passl:-lcrypto \ --passL:-static \ + --passL:-flto=thin \ -d:release \ --opt:speed \ --accept