Skip to content

nitter docker arm64 tested on RPI4 #399

@takov751

Description

@takov751

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"]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions