2017-11-24 00:14:41 +01:00
|
|
|
FROM xataz/nginx
|
2017-11-23 20:21:10 +01:00
|
|
|
|
2017-11-23 22:15:12 +01:00
|
|
|
ENV UID=991 GID=991 \
|
|
|
|
NPROC=2
|
2017-11-23 20:21:10 +01:00
|
|
|
|
|
|
|
RUN export BUILD_DEPS="build-base \
|
|
|
|
libxml2-dev \
|
|
|
|
libxslt-dev \
|
|
|
|
curl-dev \
|
|
|
|
git \
|
2017-11-24 00:20:19 +01:00
|
|
|
ruby-dev \
|
2017-11-24 01:31:04 +01:00
|
|
|
libffi-dev \
|
2017-11-24 00:49:35 +01:00
|
|
|
libtirpc-dev \
|
2017-11-23 20:21:10 +01:00
|
|
|
imagemagick-dev" \
|
2017-11-23 21:02:12 +01:00
|
|
|
&& apk add -U ${BUILD_DEPS} \
|
2017-11-23 20:21:10 +01:00
|
|
|
libressl \
|
|
|
|
imagemagick \
|
|
|
|
curl \
|
|
|
|
ghostscript \
|
|
|
|
git \
|
|
|
|
postgresql-client \
|
|
|
|
su-exec \
|
|
|
|
s6 \
|
2017-11-23 21:28:09 +01:00
|
|
|
ca-certificates \
|
2017-11-23 22:27:35 +01:00
|
|
|
coreutils \
|
2017-11-23 22:38:54 +01:00
|
|
|
gcc \
|
2017-11-24 00:12:36 +01:00
|
|
|
nodejs \
|
|
|
|
nodejs-npm \
|
2017-11-24 01:22:26 +01:00
|
|
|
libffi \
|
2017-11-24 00:12:36 +01:00
|
|
|
ruby \
|
|
|
|
ruby-irb \
|
|
|
|
ruby-rdoc \
|
2017-11-23 20:21:10 +01:00
|
|
|
&& gem install bundler \
|
|
|
|
&& git clone -b master https://github.com/diaspora/diaspora.git /diaspora \
|
|
|
|
&& cd /diaspora \
|
2017-11-24 01:14:50 +01:00
|
|
|
&& sed -i -e "s/gem \"eye\", \"0.9.2\"/gem \"eye\", \"~> 0.9.2.nosigar\"/g" Gemfile \
|
2017-11-23 20:21:10 +01:00
|
|
|
&& chmod +x script/server \
|
2017-11-23 23:32:12 +01:00
|
|
|
&& bin/bundle config --global silence_root_warning 1 \
|
2017-11-24 00:00:36 +01:00
|
|
|
&& bin/bundle config timeout 120 \
|
2017-11-23 23:53:38 +01:00
|
|
|
&& bin/bundle install --retry 4 --without test development \
|
2017-11-23 20:21:10 +01:00
|
|
|
&& apk del ${BUILD_DEPS} \
|
|
|
|
&& rm -rf /tmp/* /var/cache/apk/* /tmp/* /root/.gnupg /root/.cache/ /diaspora/.git
|
|
|
|
|
2017-11-24 00:00:36 +01:00
|
|
|
|
2017-11-23 20:21:10 +01:00
|
|
|
COPY rootfs/ /
|
2017-11-23 21:18:37 +01:00
|
|
|
|
|
|
|
RUN chmod +x /usr/local/bin/startup \
|
|
|
|
&& chmod +x /etc/s6.d/diaspora/run
|
|
|
|
|
2017-11-23 21:13:20 +01:00
|
|
|
VOLUME ["/config", "/diaspora/public"]
|
2017-11-23 23:00:50 +01:00
|
|
|
EXPOSE 8080
|
2017-11-23 20:21:10 +01:00
|
|
|
ENTRYPOINT [ "/usr/local/bin/startup" ]
|
|
|
|
CMD ["/bin/s6-svscan", "/etc/s6.d"]
|