This repository has been archived by the owner on Oct 29, 2023. It is now read-only.
forked from ultrahang/docker-diaspora
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
76 lines (61 loc) · 2.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM golang:1.9-stretch as confd
ARG CONFD_VERSION=0.16.0
ADD https://github.com/kelseyhightower/confd/archive/v${CONFD_VERSION}.tar.gz /tmp/
RUN apt-get update \
&& apt-get install -y \
make \
bzip2 \
&& mkdir -p /go/src/github.com/kelseyhightower/confd && \
cd /go/src/github.com/kelseyhightower/confd && \
tar --strip-components=1 -zxf /tmp/v${CONFD_VERSION}.tar.gz && \
go install github.com/kelseyhightower/confd && \
rm -rf /tmp/v${CONFD_VERSION}.tar.gz
FROM ruby:2.4-slim-stretch
ARG DIASPORA_VER=0.7.12.0
ENV RAILS_ENV=production \
UID=942 \
GID=942
RUN apt-get update \
&& apt-get install -y \
build-essential \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev \
libxslt-dev \
imagemagick \
ghostscript \
curl \
libmagickwand-dev \
git \
libpq-dev \
default-libmysqlclient-dev \
nodejs \
wget \
libjemalloc-dev \
gosu \
&& rm -rf /var/lib/apt/lists/*
RUN addgroup --GID ${GID} diaspora \
&& adduser --uid ${UID} --gid ${GID} \
--home /diaspora --shell /bin/sh \
--disabled-password --gecos "" diaspora
COPY --from=confd /go/bin/confd /usr/local/bin/confd
RUN mkdir -p /etc/confd/conf.d
RUN mkdir -p /etc/confd/templates
USER diaspora
WORKDIR /diaspora
RUN git clone --depth 1 -b v${DIASPORA_VER} https://github.com/diaspora/diaspora.git diaspora
RUN rm -fr diaspora/.git
RUN mv /diaspora/diaspora/* /diaspora/
RUN mkdir /diaspora/log \
&& cp config/database.yml.example config/database.yml
RUN gem install bundler \
&& script/configure_bundler \
&& bin/bundle config --local with postgresql mysql \
&& bin/bundle install --full-index -j$(getconf _NPROCESSORS_ONLN)
COPY --chown=root:staff entrypoints/ /usr/local/bin/
COPY --chown=root:staff config/*.tmpl /etc/confd/templates/
COPY --chown=root:staff config/*.toml /etc/confd/conf.d/
# COPY --chown=diaspora:diaspora config/*.yml /diaspora/config/
VOLUME /diaspora/public
LABEL maintainer="nikkoura"
LABEL source="https://github.com/nikkoura/docker-diaspora"