Closed accforgithubtest closed 7 months ago
If it helps, here's my recent experience on this topic:
etc/dockerfile
runs make build_linux
which assumes it's compiling for amd64. If you're using an arm64 device, e.g. a Raspberry Pi, then you'll need to run make build_default
instead.-D_LARGEFILE64_SOURCE
to the CGO_CFLAGS
environment variable is a temporary fix. For further information, see: https://github.com/mattn/go-sqlite3/pull/1177@nkanaev I'm happy to raise a PR to add this to the docs if you like.
I ended up with the following Dockerfile:
FROM golang:1.21.5-alpine AS build
RUN apk add --no-cache build-base git
WORKDIR /src
RUN git clone https://github.com/nkanaev/yarr.git .
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
RUN make build_default
FROM alpine:3.19
COPY --from=build /src/_output/yarr /usr/local/bin/yarr
RUN mkdir /data
CMD ["/usr/local/bin/yarr", "-addr", "0.0.0.0:7070", "-db", "/data/yarr.db"]
I'm running yarr behind Caddy with Tailscale HTTPS, so my docker-compose.yml
file is a bit more complicated, but a basic example might look like this, assuming it's in the same directory as the Dockerfile and that you've also created a sub-directory called data
:
version: "3"
services:
yarr:
build:
context: .
ports:
- 7070:7070
volumes:
- ./data:/data
If it helps, here's my recent experience on this topic:
- There is already an unofficial (?) image on dockerhub: https://hub.docker.com/r/arsfeld/yarr
- The default
etc/dockerfile
runsmake build_linux
which assumes it's compiling for amd64. If you're using an arm64 device, e.g. a Raspberry Pi, then you'll need to runmake build_default
instead.- There's currently an issue with compiling go-sqlite3 on the latest Go 1.21.5 Alpine docker image (used by the above Dockerfile). Adding
-D_LARGEFILE64_SOURCE
to theCGO_CFLAGS
environment variable is a temporary fix. For further information, see: Fix musl build (#1164) mattn/go-sqlite3#1177- You can already import/export an OPML file with the list of RSS feeds from the web interface, if that helps.
@nkanaev I'm happy to raise a PR to add this to the docs if you like.
I ended up with the following Dockerfile:
FROM golang:1.21.5-alpine AS build RUN apk add --no-cache build-base git WORKDIR /src RUN git clone https://github.com/nkanaev/yarr.git . ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE" RUN make build_default FROM alpine:3.19 COPY --from=build /src/_output/yarr /usr/local/bin/yarr RUN mkdir /data CMD ["/usr/local/bin/yarr", "-addr", "0.0.0.0:7070", "-db", "/data/yarr.db"]
I'm running yarr behind Caddy with Tailscale HTTPS, so my
docker-compose.yml
file is a bit more complicated, but a basic example might look like this, assuming it's in the same directory as the Dockerfile and that you've also created a sub-directory calleddata
:version: "3" services: yarr: build: context: . ports: - 7070:7070 volumes: - ./data:/data
Hello, I forked a repository called rebron1900/yarr and made some small improvements.
I want to publish it to Docker Hub using Action, but I encountered an error while running it. After my investigation, I found that the master branch and tag branch of the original author have different file structures. How did they manage to do that?
How can I make it run properly?
@grabpot thks,I have successfully packaged my own Docker image.
Would be great if we could add a GitHub Actions workflow to this repository in order to publish an official image automatically on releases.
Here are the docs.
@rebron1900 I just saw your workflow at https://github.com/rebron1900/yarr/blob/master/.github/workflows/build-docker-image. Maybe do you want to create a PR to this repository?
@rebron1900 I just saw your workflow at https://github.com/rebron1900/yarr/blob/master/.github/workflows/build-docker-image. Maybe do you want to create a PR to this repository?
Yes, this workflow works really well. And I've also added support for one -click subscription to yarr through Rsshub radar. Of course, I'm willing to do that. I will try to submit a pull request for the master branch later.
Hello there
A docker compose based set up might be the most ideal option for selfhosting. Would be great if there is a
Thank you for this project!