-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (29 loc) · 866 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# use image php 8.2 FPM for base image
FROM php:8.2-fpm
# Install dependencies
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/local/bin/composer
# Update package list APT Package
RUN apt-get update && apt-get install -y \
zip \
unzip \
git \
npm \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions for mysql
RUN docker-php-ext-install pdo pdo_mysql
# verify instalation npm
RUN npm -v
# set owner and permission for directory
RUN mkdir -p /var/www/html && \
chown -R www-data:www-data /var/www/html && \
chmod -R 777 /var/www/html
# swich user
USER haipiggi
# set working directory
WORKDIR /var/www/html
# add label
LABEL maintainer="[email protected]"
LABEL description="This is a Dockerfile for setting up a PHP environment with Composer, npm, and Node.js"
LABEL version="1.0"