mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
2.x docker
This commit is contained in:
@ -1,9 +1,5 @@
|
||||
ARG RELEASE=1
|
||||
|
||||
FROM ubuntu:22.04
|
||||
|
||||
ENV RELEASE_ARG=$RELEASE
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
@ -12,19 +8,19 @@ ENV DEBIAN_FRONTEND noninteractive
|
||||
RUN apt-get clean && apt-get update && apt-get update && apt-get upgrade -y && apt-get autoremove -y
|
||||
|
||||
# requirements
|
||||
RUN apt-get install -y software-properties-common curl zip unzip git gcc
|
||||
RUN apt-get install -y software-properties-common curl zip unzip gcc
|
||||
|
||||
# nginx
|
||||
RUN apt-get install -y nginx
|
||||
|
||||
# php
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y cron gnupg gosu curl ca-certificates zip unzip git supervisor libcap2-bin libpng-dev \
|
||||
&& apt-get install -y cron gnupg gosu curl ca-certificates zip unzip supervisor libcap2-bin libpng-dev \
|
||||
python2 dnsutils librsvg2-bin fswatch wget \
|
||||
&& add-apt-repository ppa:ondrej/php -y \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y php8.2 php8.2-fpm php8.2-mbstring php8.2-mcrypt php8.2-gd php8.2-xml \
|
||||
php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.2-sqlite3
|
||||
php8.2-curl php8.2-gettext php8.2-zip php8.2-bcmath php8.2-soap php8.2-redis php8.2-sqlite3 php8.2-intl
|
||||
COPY docker/php.ini /etc/php/8.2/cli/conf.d/99-vito.ini
|
||||
|
||||
# composer
|
||||
@ -32,8 +28,8 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
|
||||
|
||||
# app
|
||||
RUN rm -rf /var/www/html
|
||||
RUN git clone -b 1.x https://github.com/vitodeploy/vito.git /var/www/html
|
||||
RUN [ "$RELEASE_ARG" = "1" ] && git checkout $(git tag -l --merged 1.x --sort=-v:refname | head -n 1) || true
|
||||
COPY . /var/www/html
|
||||
RUN rm -rf /var/www/html/.git /var/www/html/vendor /var/www/html/node_modules
|
||||
RUN composer install --no-dev --prefer-dist
|
||||
RUN chown -R www-data:www-data /var/www/html \
|
||||
&& chmod -R 755 /var/www/html/storage /var/www/html/bootstrap/cache
|
||||
|
Reference in New Issue
Block a user