Sign inSign up

newdeveloper/apache-php-composer

By newdeveloper

•Updated about 2 months ago

apache-php-composer

Image
8

10M+

newdeveloper/apache-php-composer repository overview

⁠Apache php8 composer ubuntu 2022.04

⁠Voor projecten zoals laravel

⁠Dockerfile:

FROM newdeveloper/apache-php

⁠# Install dependencies

RUN apt-get update -y

RUN apt-get upgrade -y

RUN apt install tzdata

ENV TZ "Europe/Amsterdam"

RUN echo "Europe/Amsterdam" > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata RUN apt-get install -y git curl apache2 php libapache2-mod-php php-mysql php-mbstring php-xml php-gd php-zip php-curl php-tidy

RUN apt-get install -y vim nano gnupg

RUN apt update

RUN apt install -y php-gmp

RUN a2enmod ssl

RUN curl -sL https://deb.nodesource.com/setup_8.x⁠ | bash -

RUN apt-get install -y nodejs

RUN curl -sS https://getcomposer.org/installer⁠ | php

RUN mv composer.phar /usr/local/bin/composer

RUN chmod +x /usr/local/bin/composer

RUN npm install -g npm@latest

⁠#Term aanmaken

RUN echo "export TERM=xterm" >> /root/.bashrc

⁠# Install app

RUN rm -rf /var/www/html/*

ADD src /var/www/html/

⁠# Configure apache

RUN rm -f /etc/apache2/sites-available/000-default.conf

ADD ./settings/000-default.conf /etc/apache2/sites-available/

RUN a2enmod rewrite

RUN chown -R www-data:www-data /var/www/html/

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

ARG DEBIAN_FRONTEND=noninteractive

EXPOSE 80 443

COPY run.sh /run.sh

copy ssl/server.* /etc/apache2/ssl/example/

RUN chmod a+rx /run.sh

CMD ["/bin/bash", "/run.sh"]

Tag summary

Content type

Image

Digest

sha256:7177509ab…

Size

567.9 MB

Last updated

about 2 months ago

docker pull newdeveloper/apache-php-composer