mY777
mY777

Reputation: 249

Docker TYPO3 environment

I created a Dockerfile with ubuntu,php,apache & mysql now I'm stuck I would like to integrate TYPO3 into it I can get the installation and put it in my ubuntu root machine. How can I access it on my document root in this case this is /www/. what are the next steps and how can I solve it?

enter image description here

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 \
    wget \
    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


RUN cd /var/www/html && \
    wget -O - https://get.typo3.org/8.7 | tar -xzf - && \
    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. .

# 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

# 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

# Configure volumes
    VOLUME /var/www/html/fileadmin
    VOLUME /var/www/html/typo3conf
    VOLUME /var/www/html/typo3temp
    VOLUME /var/www/html/uploads

enter image description here

Upvotes: 0

Views: 487

Answers (1)

kkugelmann
kkugelmann

Reputation: 111

There is a docker boilerplate specially for TYPO3 Projects - I think it might be helpful even for further questions on how to set up docker for TYPO3 installations as it's a really comprehensive solution.

You might want to take a look: https://github.com/webdevops/TYPO3-docker-boilerplate

Upvotes: 2

Related Questions