docker-images/images/shiori/Dockerfile

39 lines
1 KiB
Docker
Raw Normal View History

2021-04-03 19:09:57 +00:00
ARG REPO_LOCATION
FROM ${REPO_LOCATION}minideb AS builder
RUN install_packages software-properties-common git gpg dirmngr gpg-agent gcc libc-dev
# Add the golang apt repository
# Note that install_packages runs apt update automatically
# Apparentl apt-add-repository doesn't properly import the GPG key :-/
2021-07-30 20:09:13 +00:00
RUN echo "deb http://ppa.launchpad.net/longsleep/golang-backports/ubuntu focal main" >/etc/apt/sources.list.d/golang.list \
2021-04-03 19:09:57 +00:00
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F6BC817356A3D45E
RUN install_packages golang-go
RUN git clone https://github.com/go-shiori/shiori.git /srv/shiori
WORKDIR /srv/shiori
RUN git checkout "$(git describe --tags "$(git rev-list --tags --max-count=1)")"
# armv7l+, GOARM can be set as low as 5 if you have an old board (but I have Raspberry Pi 4B+ boards)
RUN GOOS=linux GOARCH=arm GOARM=7 go build -v
FROM ${REPO_LOCATION}minideb
COPY --from=builder /srv/shiori/shiori /srv/shiori
2021-04-03 19:25:30 +00:00
COPY ./run.sh /srv/run.sh
2021-04-03 19:09:57 +00:00
VOLUME /srv/data
WORKDIR /srv/data
USER 95:95
ENTRYPOINT [ "/srv/run.sh" ]
CMD [ "serve" ]