Initial commit

main
Mageas 1 year ago
commit 1d3ffe1ea2
Signed by: Mageas
GPG Key ID: B45836562531E7AD
  1. 102
      Dockerfile
  2. 13
      docker-compose.yml
  3. 9
      entrypoint.sh

@ -0,0 +1,102 @@
FROM rust:1.56-alpine as builder
ARG GIT="https://gitlab.com/Mageas/matrix_rss"
ARG GIT_BRANCH="master"
WORKDIR /usr/src/app
RUN apk update && \
apk upgrade && \
apk add --no-cache musl-dev clang-dev openssl-dev git make cmake g++
RUN git clone "$GIT" --branch "$GIT_BRANCH" .
RUN RUSTFLAGS="-Ctarget-feature=-crt-static" cargo install --path .
FROM alpine:3.15.0
RUN apk update && \
apk upgrade && \
apk add --no-cache libstdc++ su-exec
COPY --from=builder /usr/local/cargo/bin/matrix_rss /app/matrix_rss
RUN chmod u+x /app/matrix_rss
COPY entrypoint.sh /entrypoint.sh
RUN chmod u+x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
#FROM rust:1.56-slim-buster as builder
#
#WORKDIR /usr/src/app
#
#RUN apt-get update \
# && apt-get install -y cmake
#RUN git clone https://gitlab.com/Mageas/matrix_rss .
#
#RUN cargo install --path .
#
#
#
#FROM ubuntu:22.04
#
#RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
# && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
#ENV LANG en_US.utf8
#
#RUN apt-get update \
# && apt-get install -y cmake build-essential libssl-dev libc6 libc-bin
#
#COPY --from=builder /usr/local/cargo/bin/matrix_rss /app/matrix_rss
#RUN chmod u+x /app/matrix_rss
#
#COPY entrypoint.sh /entrypoint.sh
#RUN chmod u+x /entrypoint.sh
#
#ENTRYPOINT ["/entrypoint.sh"]
#FROM debian:buster-slim
#RUN apt-get update \
# && apt-get install -y libssl1.1 && rm -rf /var/lib/apt/lists/*
##WORKDIR /app
#COPY --from=builder /usr/local/cargo/bin/matrix_rss /app/matrix_rss
#EXPOSE 80
#CMD ["/app/matrix_rss"]
#FROM ubuntu:22.04
#
#RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
# && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
#ENV LANG en_US.utf8
#
#RUN apt-get update \
# && apt-get install -y cmake build-essential libssl-dev libc6 libc-bin
#
#COPY app/matrix_rss /app/matrix_rss
#
#COPY entrypoint.sh /entrypoint.sh
#RUN chmod u+x /entrypoint.sh
#
#ENTRYPOINT ["/entrypoint.sh"]

@ -0,0 +1,13 @@
version: '3.5'
services:
matrix_rss:
image: registry.gitlab.com/mageas/matrix_rss_docker
volumes:
- ./config.json:/app/config.json
- database:/app/sled_db
environment:
- UID=1000
- GID=1000
volumes:
database:

@ -0,0 +1,9 @@
#!/bin/sh
app="/app"
cd ${app}
chown ${UID:-0}:${GID:-0} -R ${app}
su-exec ${UID:-0}:${GID:-0} ./matrix_rss
Loading…
Cancel
Save