ckan-2-6-legacy/Dockerfile

43 lines
2.0 KiB
Docker

ARG UBUNTU_VERSION=14.04
FROM ubuntu:$UBUNTU_VERSION
# CKAN user
RUN useradd -l -M -s /bin/bash -u 997 ckan
LABEL org.d4science.image.licenses="EUPL-1.2" \
org.d4science.image.source="https://code-repo.d4science.org/D4Science/ckan-2-6-legacy" \
org.d4science.image.vendor="D4Science <https://www.d4science.org>" \
org.d4science.image.authors="Andrea Dell'Amico <andrea.dellamico@isti.cnr.it>, Alfredo Oliviero <alfredo.oliviero@isti.cnr.it>"
# Aggiorna pacchetti e installa i servizi necessari
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y python python-pip \
&& apt-get install -y supervisor redis-server apache2 libapache2-mod-wsgi libapache2-mod-rpaf libapache2-mod-xsendfile nginx-full memcached \
&& apt-get install -y libedit2 libpq5 postgresql-client \
&& apt-get clean
# Configura Supervisor
RUN mkdir -p /var/log/supervisor /var/log/ckan && chown ckan /var/log/ckan
# Creazione del file di configurazione per Supervisor
COPY conf/supervisord.conf /etc/supervisor/supervisord.conf
COPY conf/supervisord-ckan-services.conf /etc/supervisor/conf.d/ckan-services.conf
COPY conf/supervisord-ckan-harvesting.conf /etc/supervisor/conf.d/ckan-harvesting.conf
# Services configuration
COPY conf/apache_ckan_virthost.conf /etc/apache2/sites-enabled/ckan.conf
COPY conf/apache_ckan_datapusher.conf /etc/apache2/sites-enabled/datapusher.conf
COPY conf/apache_ports.conf /etc/apache2/ports.conf
COPY conf/nginx_ckan_virtualhost.conf /etc/nginx/sites-enabled/ckan.conf
COPY conf/redis-server.conf /etc/redis/redis.conf
COPY conf/nginx.conf /etc/nginx/nginx.conf
RUN rm -f /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-available/000-default.conf /etc/nginx/sites-enabled/default
ADD ckan-dist/ckan-2.69.tar.gz /
ADD ckan-dist/ckan-etc.tar.gz /
# Definisce Supervisor come entrypoint
# CMD ["/usr/bin/supervisord", "-n", "-c /etc/supervisor/supervisord.conf"]
CMD ["/usr/bin/supervisord", "-n"]