Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nitter docker arm64 tested on RPI4 #399

Closed
takov751 opened this issue Jun 10, 2021 · 7 comments
Closed

nitter docker arm64 tested on RPI4 #399

takov751 opened this issue Jun 10, 2021 · 7 comments

Comments

@takov751
Copy link

takov751 commented Jun 10, 2021

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

@unixfox
Copy link
Contributor

unixfox commented Dec 18, 2021

Update 26/03/2023, please use the official ARM64 docker image: zedeus/nitter:latest-arm64.


I have published a Docker image that is compatible with ARM64, intel x86/AMD64 and maybe with ARMv7 (not tested): https://quay.io/repository/unixfox/nitter

The image is based on https://github.com/goodtiding5/docker-nitter, so it is a bit different from the original nitter docker image.
And the image is automatically updated for every new commit from https://github.com/zedeus/nitter.

The source code is here: https://github.com/unixfox/periodic-build-with-github-actions/tree/master/nitter

@zedeus
Copy link
Owner

zedeus commented Dec 31, 2021

Thank you @unixfox! I've added a link to the readme so people won't trip over the broken ARM64 image in the official Docker repo.

@zedeus zedeus closed this as completed Dec 31, 2021
@Hilasr
Copy link

Hilasr commented Feb 17, 2022

ح

@woj-tek
Copy link

woj-tek commented Aug 18, 2022

Actually looking at workflows/build-docker.yml and especially platforms line and workflow documentation I wonder if adding it would be problematic. I guess it boils down to lack of nim's base image for arm64, which was requested a while back: moigagoo/nimage#40.

Could we re-open this issue to allow tracking in the future?

@unixfox
Copy link
Contributor

unixfox commented Aug 18, 2022

Actually looking at workflows/build-docker.yml and especially platforms line and workflow documentation I wonder if adding it would be problematic.

How do you want to build a docker image for another platform other than linux/amd64 if the base docker image for nim is not available for arm64...?

@woj-tek
Copy link

woj-tek commented Aug 18, 2022

My comment was somewhat out of place - in the next sentence I already mentioned: "I guess it boils down to lack of nim's base image for arm64" so I'm aware of it. I wonder what's the main roadblock for nimlang to provide multi-arch images, considering that there are unofficial ones that (seems to) work, like the one that you use (ghcr.io/maxisoft/nim-docker-images/nim)

@unixfox
Copy link
Contributor

unixfox commented Feb 26, 2023

Please use new the official ARM64 docker image: zedeus/nitter:latest-arm64. Mine is not going away, but this one is official and compiled on every new commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants