Skip to content

Commit

Permalink
docker: expose /etc/zotonic as volume with config and user sites and …
Browse files Browse the repository at this point in the history
…modules.
  • Loading branch information
kaos committed Dec 15, 2015
1 parent 5dfd5a6 commit f93a72d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
@@ -1,8 +1,7 @@
FROM debian
MAINTAINER Andreas Stenius git@astekk.se

RUN apt-get update && apt-get install -y erlang build-essential postgresql imagemagick exif wget git
RUN \
RUN apt-get update && apt-get install -y erlang build-essential postgresql imagemagick exif wget git && \
useradd --system --create-home zotonic && \
printf "# Zotonic settings \n\
local all zotonic ident \n\
Expand All @@ -20,9 +19,13 @@ EXPOSE 8000
ENV ERL_FLAGS -noinput
ENTRYPOINT ["./bin/zotonic"]
CMD ["debug"]
VOLUME /etc/zotonic

ADD . /home/zotonic/
RUN chown zotonic:zotonic -R .
RUN mkdir -p /etc/zotonic/config /etc/zotonic/user && \
ln -s /etc/zotonic/config /home/zotonic/.zotonic && \
ln -s /etc/zotonic/user /home/zotonic/user && \
chown -LR zotonic:zotonic .

USER zotonic
RUN make

0 comments on commit f93a72d

Please sign in to comment.