Docker image for sending reminders

This commit is contained in:
Stefan Schlott 2022-08-26 17:22:06 +02:00
parent b3417ce55a
commit a84f7c331a
3 changed files with 33 additions and 0 deletions

8
.dockerignore Normal file
View file

@ -0,0 +1,8 @@
content
.bundle
.git
output
tmp
*/target
*/bundle

17
Dockerfile-reminders Normal file
View file

@ -0,0 +1,17 @@
FROM rust:1-bullseye AS toot
COPY toot /toot
RUN cd /toot && cargo build
FROM ruby:3-bullseye
COPY --from=toot /toot/target/debug/toot /usr/local/bin/
RUN gem install t
COPY scripts/send-reminder-tweets.sh /usr/local/bin/
VOLUME /data
ENV WEBSITE_DIR=/website
RUN useradd -M -d /data reminders && chown reminders:reminders /data
USER reminders:reminders
WORKDIR /data
CMD /usr/local/bin/send-reminder-tweets.sh

8
scripts/build-docker-images.sh Executable file
View file

@ -0,0 +1,8 @@
#!/usr/bin/env bash
set -u -e
cd `dirname $0`/..
docker build -f Dockerfile-reminders -t cccs-reminders:latest .