• [^] # Re: Dockerfile

    Posté par (site web personnel) . En réponse au journal FusionForge & Docker. Évalué à 6.

    Et histoire de continuer, si je devais maintenir ce Dockerfile je le changerais dans sa présentation pour le rendre (en tout cas à mon goût) plus lisible, qu'on voit mieux les différentes commandes et leurs arguments.

    Voici un exemple, c'est pas garanti que ça fonctionne comme souhaité c'est surtout pour la présentation.

    FROM centos:centos7
    MAINTAINER FusionForge TrivialDev <franck.villaume@trivialdev.com>
    LABEL maintainer "FusionForge TrivialDev <franck.villaume@trivialdev.com>"
    LABEL name "FusionForge"
    LABEL version "allinone"
    RUN yum -y install git openssh-server; yum clean all
    WORKDIR /opt/sources
    RUN git clone https://scm.fusionforge.org/anonscm/git/fusionforge/fusionforge.git
    WORKDIR /opt/sources/fusionforge
    RUN set -x \
     && source ./autoinstall/common-backports \
     && yum install -y \
     make \
     tar \
     backports_rpm \
     && yum --enablerepo=epel install -y httpd-itk \
     && yum install -y \
     gettext \
     php-cli \
     php-pgsql \
     php-process \
     php-mbstring \
     php-pear-HTTP \
     httpd \
     mod_dav_svn \
     mod_ssl \
     postgresql-server \
     postgresql-contrib \
     nscd \
     cvs \
     subversion \
     viewvc \
     python-pycurl \
     git \
     gitweb \
     xinetd \
     moin \
     mod_wsgi \
     python-psycopg2 \
     unoconv \
     poppler-utils \
     libreoffice-headless \
     cronie \
     mediawiki \
     && yum clean all
    WORKDIR /opt/sources/fusionforge/src
    RUN set -x \
     && make \
     && make \
     install-base \
     install-shell \
     install-scm \
     install-plugin-scmcvs \
     install-plugin-scmsvn \
     install-plugin-scmgit \
     install-plugin-blocks \
     install-plugin-moinmoin \
     install-plugin-taskboard \
     install-plugin-message \
     install-plugin-repositoryapi \
     install-plugin-mediawiki
    RUN yum --enablerepo=epel install -y supervisor && yum clean all
    RUN mkdir /var/run/sshd
    RUN /usr/sbin/sshd-keygen
    USER postgres
    RUN /usr/bin/initdb -D /var/lib/pgsql/data
    USER root
    COPY ./supervisord.conf /etc/supervisord.conf
    COPY ./startpoint.sh /startpoint.sh
    COPY ./postinstall.sh /postinstall.sh
    RUN chmod +x /startpoint.sh
    RUN chmod +x /postinstall.sh
    EXPOSE 22 80 443
    ENTRYPOINT ["/startpoint.sh"]
    CMD []