Create Dockerfile

This commit is contained in:
slawkens 2023-09-16 14:40:58 +02:00
parent fee9d60da4
commit e9b5617748

42
Dockerfile Normal file
View File

@ -0,0 +1,42 @@
FROM php:8.2-apache
# Arguments defined in docker-compose.yml
ARG user
ARG uid
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
libzip-dev \
zip \
unzip
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install pdo pdo_mysql bcmath gd zip
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create system user to run Composer Commands
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user
RUN cd /home/$user
RUN git clone https://github.com/otland/forgottenserver.git
USER $user
# Set working directory
WORKDIR /var/www/html
#RUN composer install