CureNet/docker/Dockerfile

51 lines
2.4 KiB
Docker

FROM debian:10
RUN apt update \
&& echo "Binary::apt::APT::Keep-Downloaded-Packages \"true\";" | tee /etc/apt/apt.conf.d/01keep-debs \
&& apt install -y wget lsb-release ca-certificates apt-transport-https software-properties-common gnupg2 gcc g++ make \
&& echo "configure repos" \
&& echo "deb https://packages.sury.org/php/ buster main" | tee /etc/apt/sources.list.d/php.list \
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list \
&& echo "deb https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/buster pgadmin4 main" | tee /etc/apt/sources.list.d/pgdg.list \
&& echo "download keys" \
&& (wget -qO - https://packages.sury.org/php/apt.gpg | apt-key add - ) \
&& (wget -qO - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - ) \
&& (wget -qO - https://www.pgadmin.org/static/packages_pgadmin_org.pub | apt-key add - ) \
&& echo "install nodejs" \
&& wget -qO - https://deb.nodesource.com/setup_16.x | bash - \
&& echo "update repos" \
&& apt update \
&& echo "install software" \
&& apt install -y aptitude unzip \
&& apt install -y postgresql pgadmin4 \
&& apt install -y php8.0 php8.0-ctype php8.0-iconv php8.0-simplexml php8.0-tokenizer php8.0-fpm php8.0-pdo php8.0-pdo-pgsql php8.0-pgsql php8.0-mbstring php8.0-zip php8.0-xdebug \
&& apt install -y nginx \
&& apt install -y nodejs \
&& echo "configure tools" \
&& echo "# angular" \
&& npm install -g @angular/cli \
&& echo "# composer" \
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php --install-dir=/usr/local/bin/ --filename=composer \
&& php -r "unlink('composer-setup.php');" \
&& echo "# nginx" \
&& ln -s /web/config/nginx/app.conf /etc/nginx/conf.d/app.conf \
&& ln -s /web/config/nginx/php80.conf /etc/nginx/php80.conf \
&& echo "# postgresql" \
&& echo "postgres:WeryStronkPaz2" | chpasswd \
&& echo "# pgadmin4" \
&& bash -c 'PGADMIN_SETUP_EMAIL="admin@pgadmin.localhost" PGADMIN_SETUP_PASSWORD="WeryStronkPaz2" /usr/pgadmin4/bin/setup-web.sh --yes' \
&& echo "" > /etc/nginx/sites-enabled/default \
&& echo "!!! DONE !!!"
RUN apt install -y nano openssh-server telnet
VOLUME /web/backend/vendor
VOLUME /web/backend/var
VOLUME /web/frontend/node_modules
EXPOSE 7700 7780 7781 49153
STOPSIGNAL SIGQUIT
CMD ["bash", "/web/config/startup.sh"]