Build nim from source instead of prebuilts
Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
parent
364d2a9121
commit
eea438b3ab
1 changed files with 12 additions and 3 deletions
15
Dockerfile
15
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 \
|
||||
|
|
Loading…
Reference in a new issue