| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- ARG PHP_VERSION=8.3
- ARG NVM_VERSION=22
- FROM php:${PHP_VERSION}-apache
- RUN apt-get update && apt-get install -y \
- libfreetype6-dev \
- libpng-dev \
- libwebp-dev \
- libjpeg62-turbo-dev \
- libmcrypt-dev \
- libzip-dev \
- zip \
- git \
- libxpm-dev \
- libonig-dev \
- && docker-php-ext-configure gd \
- --with-jpeg \
- --with-freetype \
- && docker-php-ext-install \
- mbstring \
- mysqli \
- pdo_mysql \
- gd \
- zip \
- && pecl install xdebug \
- && docker-php-ext-enable xdebug \
- && a2enmod \
- rewrite
- # Add the user UID:1000, GID:1000, home at /app
- RUN groupadd -r app -g 1000 && useradd -u 1000 -r -g app -m -d /app -s /sbin/nologin -c "App user" app && \
- chmod 755 /var/www/html
- RUN php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer
- RUN echo "ServerName localhost" | tee -a /etc/apache2/httpd.conf
- USER app
- WORKDIR /var/www/html
- USER root
- # Set environment variables
- ENV NVM_DIR /root/.nvm
- # Install curl, and download and install nvm
- RUN apt-get update && \
- apt-get install -y curl && \
- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash && \
- . "$NVM_DIR/nvm.sh" && \
- nvm install 22 && \
- npm install npm@latest -g && \
- npm install n -g && \
- n latest
- # Set the PATH to include nvm binaries
- ENV PATH $NVM_DIR/versions/node/$(nvm version)/bin:$PATH
- ENV WORKSPACE_FOLDER=/var/www/html
- RUN npm install tailwindcss @tailwindcss/vite
- EXPOSE 80
- EXPOSE 5173
|