-
-
Notifications
You must be signed in to change notification settings - Fork 706
Closed
Description
As i couldn't build docker version for arm64 as the nim-alpine docker only available for amd64 due dockerhub does not build for arm on its own. There are other solutions ,but until then i recreated the Dockerfile with the original nim building docker.
If someone willing to experiment with it. Tested on RPI4 ,build time around 1 hour.
New Dockerfile for arm64
FROM alpine as nim
EXPOSE 8080
RUN apk add --no-cache g++ curl tar xz nodejs
RUN mkdir -p /nim; curl -sL "https://nim-lang.org/download/nim-1.4.8.tar.xz" |tar xJ --strip-components=1 -C /nim; cd /nim; sh build.sh; rm -r c_code tests; ln -s `pwd`/bin/nim /bin/nim
RUN apk --no-cache add libsass-dev libffi-dev openssl-dev redis openssh-client git mercurial
RUN cd /nim; nim c koch; ./koch tools; ln -s `pwd`/bin/nimble /bin/nimble; ln -s `pwd`/bin/nimsuggest /bin/nimsuggest; ln -s `pwd`/bin/testament /bin/testament
ENV PATH=~/.nimble/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
COPY . /src/nitter
WORKDIR /src/nitter
RUN nimble build -y -d:release --passC:"-flto" --passL:"-flto" \
&& strip -s nitter \
&& nimble scss
FROM redis:6.0.4-alpine
WORKDIR /src/
RUN apk --no-cache add pcre-dev sqlite-dev
COPY --from=nim /src/nitter/nitter /src/nitter/start.sh /src/nitter/nitter.conf ./
COPY --from=nim /src/nitter/public ./public
CMD ["./start.sh"]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels