Skip to content
Snippets Groups Projects
Commit a3503a40 authored by Florian Bieringer's avatar Florian Bieringer
Browse files

Rearrange dockerfile

parent 24e4a1f0
No related branches found
No related tags found
No related merge requests found
......@@ -4,11 +4,22 @@ FROM php:7.4-apache
# Install system requirements
RUN apt update && apt install -y --no-install-recommends \
subversion default-mysql-client libcurl4-openssl-dev zlib1g-dev libpng-dev libonig-dev libzip-dev libicu-dev unzip git \
curl apt-transport-https ca-certificates lsb-release gnupg \
&& rm -rf /var/lib/apt/lists/*
# Install php extensions
RUN docker-php-ext-install pdo gettext curl gd mbstring zip pdo pdo_mysql mysqli intl json
# Install npm using nvm
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt update && apt install -y --no-install-recommends nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install composer
COPY composer.sh /tmp/composer.sh
RUN chmod u+x /tmp/composer.sh
RUN /tmp/composer.sh
# Branch Arg
ARG BRANCH=branches/4.5
......@@ -20,18 +31,9 @@ ENV APACHE_DOCUMENT_ROOT /var/www/studip/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Install composer
COPY composer.sh /tmp/composer.sh
RUN chmod u+x /tmp/composer.sh
RUN /tmp/composer.sh
# Install node.js and npm using nvm
RUN apt -y install curl apt-transport-https ca-certificates
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt -y install nodejs
# Execute make to install composer dependencies and build assets
RUN cd /var/www/studip && make
WORKDIR /var/www/studip
RUN make
# Add config template
COPY config_local.php /var/www/studip/config/config_local.inc.php.dist.docker
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment