mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[GH-ISSUE #254] Panic while trying to run cross compiled binary on Raspberry PI #188
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#188
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @quaintdev on GitHub (Jun 7, 2020).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/254
Cross compiled binary for Raspberry PI panics on device with following error
@deanishe commented on GitHub (Aug 6, 2020):
You can't cross-compile Shiori, I'm afraid. cgo doesn't support cross-compilation, and SQLite requires cgo.
I'd happily accept a PR that puts SQLite support behind a build tag, so Shiori can be cross-compiled (without SQLite support), but it's not something I consider a high priority myself.
@atsai1220 commented on GitHub (Feb 12, 2021):
This image worked for me on my rpi4.
malitov/rpi-shioriI'd love to make a PR for this but I'm not sure how to go about modifying the Dockerfile to support different platforms. From my research it sounds like using
docker buildxfeature.Reference: https://github.com/malitov/rpi-shiori
Looks like this PR will integrate armv7 build: https://github.com/go-shiori/shiori/pull/278
@sunrisepi commented on GitHub (Feb 21, 2021):
I figured out another way to successfully compile the shiori Docker image on Raspberry Pi 4B (ARM, 32bit).
# build stage
FROM nathanosman/alpine-golang-armhf AS builder
RUN apk add --no-cache build-base
WORKDIR /src
COPY . .
RUN go build
# server image
FROM nathanosman/alpine-golang-armhf
COPY --from=builder /src/shiori /usr/local/bin/
ENV SHIORI_DIR /srv/shiori/
EXPOSE 8080
CMD ["/usr/local/bin/shiori", "serve"]
Then you can just follow the steps in the wiki to use the docker image: https://github.com/go-shiori/shiori/wiki/Usage#running-docker-container
For reference, here is my docker-compose.yml code for running shiori. Then I run docker-compose up -d to create the container. After that, just go to port 4141 on the host you're running this from, login to shiori per the above wiki usage steps and enjoy!
shiori:
image: shiori
container_name: shiori
ports:
- 4141:8080
volumes:
- /home/pi/mydockerapps/shiori/data:/srv/shiori
restart: unless-stopped
I used a similar process to get wallabag to compile for Raspberry Pi 4B. References I followed, in case anyone else would like to build their own wallabag docker image:
Have fun! :)
@tricoos commented on GitHub (Oct 12, 2021):
@sunrisepi Thanks, works perfectly!
@stale[bot] commented on GitHub (Feb 10, 2022):
This issue has been automatically marked as stale because it has not had any activity for quite some time.
It will be closed if no further activity occurs.
Thank you for your contributions.