2017-09-27 7 views
0

Je suis en train d'exécuter quelques vues Docker Containers dans le code ci-dessous. Je voudrais intégrer le TYPO3 via w get mais obtenir une ERREUR: Service 'application' n'a pas réussi à construire: ADD a échoué: stat/mnt/sda1/var/lib/docker/tmp/docker-builder400003814/|: pas un tel fichier ou répertoire comment puis-je le résoudre? et déplacer les dossiers nécessaires dans mes www/chemin merci :)Exécution de TYPO3 dans Docker via wget ''

docker-compose up -d

`docker-compose.yml` 
 

 
    version: '2' 
 
     services: 
 
     version: '2' 
 
services: 
 
    ####################################### 
 
    # PHP application Docker container 
 
    ####################################### 
 
    app: 
 
    build: 
 
     context: . 
 
     dockerfile: Dockerfile 
 
    links: 
 
     - mysql 
 
    ports: 
 
     - "8000:80" 
 
####################################### 
 
# MySQL server 
 
####################################### 
 
    mysql: 
 
    build: 
 
     context: docker/mysql/ 
 
     dockerfile: MySQL-5.7.Dockerfile 
 
    restart: always 
 
    env_file: 
 
     - etc/environment.yml 
 
    networks: 
 
    - php-network 
 
####################################### 
 
# PHP MY ADMIN 
 
####################################### 
 
    myphpadmin: 
 
    build: 
 
     context: docker/myphpadmin 
 
     dockerfile: Dockerfile 
 
    restart: always 
 
    links: 
 
    - mysql 
 
    ports: 
 
    - 8080:80 
 
    environment: 
 
    - PMA_HOST=mysql 
 
    - VIRTUAL_PORT=80 
 
    networks: 
 
    - php-network 
 

 
networks: 
 
    php-network: 
 
     driver: bridge

`Dockerfile` for PHP & APACHE 
 

 

 
    FROM webdevops/php-apache-dev:ubuntu-16.04 
 

 
    ENV PROVISION_CONTEXT "development" 
 

 
    # Configure volume/workdir 
 
    WORKDIR /app/ 
 

 
Typo3 `Dockerfile` 
 

 
FROM ubuntu:latest 
 

 
ENV TYPO3_VERSION 7.6.16 
 

 
# Install apache, PHP, and supplimentary programs. openssh-server, curl, and lynx-cur are for debugging the container. 
 
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install \ 
 
    apache2 php7.0 php7.0-mysql libapache2-mod-php7.0 curl lynx-cur php7.0-curl php7.0-gd php-imagick php7.0-soap php7.0-xml php7.0-zip 
 

 
# Enable apache mods. 
 
    RUN a2enmod php7.0 
 
    RUN a2enmod rewrite 
 

 
# Update the PHP.ini file, enable <? ?> tags and quieten logging. 
 
    RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php/7.0/apache2/php.ini 
 
    RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php/7.0/apache2/php.ini 
 

 
ADD https://get.typo3.org/7.6 | tar -xzf - && \ 
 
RUN cd /var/www/html && \ 
 
    ln -s typo3_src-* typo3_src && \ 
 
    ln -s typo3_src/index.php && \ 
 
    ln -s typo3_src/typo3 && \ 
 
    ln -s typo3_src/_.htaccess .htaccess && \ 
 
    mkdir typo3temp && \ 
 
    mkdir typo3conf && \ 
 
    mkdir fileadmin && \ 
 
    mkdir uploads && \ 
 
    touch FIRST_INSTALL && \ 
 
    chown -R www-data. . 
 

 
# Manually set up the apache environment variables 
 
    ENV APACHE_RUN_USER www-data 
 
    ENV APACHE_RUN_GROUP www-data 
 
    ENV APACHE_LOG_DIR /var/log/apache2 
 
    ENV APACHE_LOCK_DIR /var/lock/apache2 
 
    ENV APACHE_PID_FILE /var/run/apache2.pid 
 

 
    # Expose apache. 
 
    EXPOSE 80 
 

 
# Copy this repo into place. 
 
    ADD www /var/www/site 
 

 
# Update the default apache site with the config we created. 
 
    ADD etc/apache-config.conf /etc/apache2/sites-enabled/000-default.conf 
 

 
# By default start up apache in the foreground, override with /bin/bash for interative. 
 
    CMD /usr/sbin/apache2ctl -D FOREGROUND

+0

Si votre code est aussi flou que dans votre écriture en anglais, il n'est pas étonnant que vous ayez des problèmes à faire fonctionner les choses. [donc] essaie d'être un site de Q & A de qualité, donc s'il vous plait accordez plus d'attention à la ponctuation, à l'orthographe et au formatage de vos futurs messages. – Anthon

Répondre

2

C'est cependant pas vraiment TYPO3 connexes. Je suggère que vous jetez un oeil à https://github.com/webdevops/TYPO3-docker-boilerplate qui est bien testé et fonctionne juste hors de la boîte.

+0

ouais je connais déjà cette solution mais ce n'est pas le point que je voudrais configurer mes propres env comprendre et comment cela fonctionne pour être plus familier avec la configuration docker et typo3. Donc, avez-vous des suggestions sur comment je peux obtenir typo3 dedans? :) – mY777

+1

Ok résolu l'onglet avant d'obtenir était la raison :) – mY777