diff --git a/Dockerfile b/Dockerfile index 04ac667..2bdfc90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nimlang/nim:alpine as builder +FROM alpine:edge as builder RUN apk update && apk add git \ build-base \ @@ -10,11 +10,20 @@ RUN apk update && apk add git \ sqlite-dev \ sqlite-static -COPY . /app -WORKDIR /app +ENV NIM_VERSION v1.6.12 + +RUN git clone https://github.com/nim-lang/Nim.git --depth=1 -b ${NIM_VERSION} && \ + cd Nim && \ + bash build_all.sh + +# Add built nim to path +ENV PATH=/Nim/bin:$PATH RUN nimble install nimble --accept +COPY . /app +WORKDIR /app + # Build with necessary params to enable statically linking openssl, glibc and sqlite3 RUN /root/.nimble/bin/nimble build --passL:-L/usr/lib \ -d:ssl \