-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.bak
63 lines (49 loc) · 2.3 KB
/
Dockerfile.bak
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
FROM artbio/ansible-galaxy-os:1604
LABEL maintainer_2="Christophe Antoniewski <[email protected]>"
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
\
\
echo "===> Allow start of services" && \
echo "exit 0" > /usr/sbin/policy-rc.d && \
\
apt-get install -qq --no-install-recommends \
apt-transport-https software-properties-common
RUN apt-get install sudo -o Dpkg::Options::="--force-confold"
ONBUILD RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
echo "===> Updating TLS certificates..." && \
apt-get install -y openssl ca-certificates
COPY . /setup
WORKDIR /setup
RUN sed -i -e 's/^# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
# work around for AUFS bug
# as per https://github.com/docker/docker/issues/783#issuecomment-56013588
RUN mkdir /etc/ssl/private-copy /var/lib/postgresql-copy && \
mv /var/lib/postgresql/* /var/lib/postgresql-copy && \
mv /etc/ssl/private/* /etc/ssl/private-copy/ && \
rm -R /var/lib/postgresql /etc/ssl/private/ && \
mv /var/lib/postgresql-copy /var/lib/postgresql && \
mv /etc/ssl/private-copy /etc/ssl/private && \
chmod -R 0700 /var/lib/postgresql /etc/ssl/private && \
chown -R 1550:1550 /var/lib/postgresql /var/run/postgresql \
/var/log/postgresql /etc/ssl/private /etc/postgresql
RUN echo 'root ALL=(ALL:ALL) ALL' >> /etc/sudoers && echo 'postgres ALL=(ALL:ALL) ALL' >> /etc/sudoers
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Warning: The following requirements pull down requires an ansible-galaxy-os compatible with ubuntu-xenial and postgresql 9.5
# see for instance https://github.com/ARTbio/ansible-galaxy-os/tree/ubuntu-xenial, if not already merged
RUN ansible-galaxy install -r requirements_roles.yml -p roles -f && \
ansible-playbook -i inventory_files/metavisitor -c local galaxy.yml
ENV NGINX_GALAXY_LOCATION="" \
GALAXY_CONFIG_ADMIN_USERS="[email protected]" \
NAT_MASQUERADE=false
ONBUILD WORKDIR /setup
ONBUILD COPY . /setup
ADD startup.sh /startup.sh
RUN chmod +x /startup.sh
# Expose port 80 (webserver), 21 (FTP server), 8800 (Proxy), 9002 (supvisord web app)
EXPOSE :80
EXPOSE :21
EXPOSE :8800
EXPOSE :9002
CMD ["/startup.sh", "/setup/inventory_files/metavisitor"]