Docker image for updating site
This commit is contained in:
parent
422462ec6e
commit
3686d1c9d7
4 changed files with 63 additions and 0 deletions
19
Dockerfile-siteupdate
Normal file
19
Dockerfile-siteupdate
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
FROM ruby:2-bullseye
|
||||
COPY Gemfile* /tmp/
|
||||
RUN cd /tmp && bundle install && rm Gemfile*
|
||||
RUN apt-get update && apt-get install -y rsync git && rm -rf /var/lib/apt/lists/*
|
||||
COPY scripts/update-site.sh /usr/local/bin/
|
||||
|
||||
# Home directory of user, containing ssh keys, etc.
|
||||
VOLUME /data
|
||||
# Website source
|
||||
ENV WEBSITE_SOURCE=/website-source
|
||||
VOLUME /website-source
|
||||
# Compiled website
|
||||
VOLUME /website
|
||||
|
||||
RUN useradd -M -d /data siteupdate && chown siteupdate:siteupdate /data /website-source /website
|
||||
USER siteupdate:siteupdate
|
||||
WORKDIR /data
|
||||
CMD /usr/local/bin/update-site.sh
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue