Added Sintonia Webapp first version docker image

This commit is contained in:
Marco Cavalli 2024-10-08 19:01:29 +02:00
parent ed30d449fe
commit 29ac9c69a3
1 changed files with 38 additions and 0 deletions

View File

@ -205,6 +205,44 @@ CMD ["/usr/local/bin/libretime-worker"]
ARG LIBRETIME_VERSION ARG LIBRETIME_VERSION
ENV LIBRETIME_VERSION=$LIBRETIME_VERSION ENV LIBRETIME_VERSION=$LIBRETIME_VERSION
#===================================================================================================================#
# Sintonia Webapp #
# helpz: #
# 1. https://medium.com/@aprilrieger/effortlessly-dockerize-your-php-laravel-app-a-step-by-step-guide-c1a6ffcc2b74 #
# 2. https://vshloda.medium.com/setting-up-a-laravel-10-development-environment-with-docker-3977a292c8dd #
# 3. https://medium.com/@joshuaadedoyin2/dockerizing-a-laravel-project-a-step-by-step-guide-db24df8a2e2c #
#===================================================================================================================#
FROM php:8.2-fpm-alpine AS sintonia-webapp
ARG user=sintonia
ARG uid=1000
RUN apk update && apk add \
curl-dev \
libzip-dev \
libpng-dev \
libxml2-dev \
postgresql-dev \
zip \
unzip \
shadow # Add shadow package to install useradd
RUN docker-php-ext-install pdo pdo_pgsql bcmath zip \
&& apk --no-cache add nodejs npm
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
#USER root
#RUN chmod 777 -R /var/www/html
RUN useradd -G www-data,root -u $uid -d /home/$user $user
RUN mkdir -p /home/$user/.composer && \
chown -R $user:$user /home/$user
WORKDIR /var/www/html
USER $user
#======================================================================================# #======================================================================================#
# Legacy # # Legacy #
#======================================================================================# #======================================================================================#