-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (32 loc) · 958 Bytes
/
Dockerfile
File metadata and controls
40 lines (32 loc) · 958 Bytes
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
38
39
40
# Base-Image
FROM php:8.2-fpm
# Install Packages
RUN apt-get update && apt-get install -y \
nginx \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
unzip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd mysqli zip opcache
# Install Node.js 16
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Nginx Config
COPY nginx.conf /etc/nginx/nginx.conf
# WordPress
WORKDIR /var/www/html
RUN curl -O https://wordpress.org/latest.tar.gz \
&& tar -zxvf latest.tar.gz \
&& rm latest.tar.gz \
&& chown -R www-data:www-data wordpress
# Starting Script
COPY start.sh /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start.sh
# Port
EXPOSE 80
# Start
CMD ["/usr/local/bin/start.sh"]