-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
53 lines (42 loc) · 1.31 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM php:7.3.12-fpm
WORKDIR /var/www
ADD src/project-css /var/www
# Fix debconf warnings upon build
ARG DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
default-mysql-client \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
locales \
libzip-dev \
jpegoptim optipng pngquant gifsicle \
vim \
unzip \
git \
curl
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install extensions
RUN docker-php-ext-install pdo_mysql mbstring zip exif pcntl \
&& docker-php-ext-configure gd --with-gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/ \
&& docker-php-ext-install gd
# install composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install nodejs LTS
ENV VERSION='18'
RUN curl -sL https://deb.nodesource.com/setup_${VERSION}.x | bash - \
&& apt -y install build-essential \
&& apt -y install nodejs \
&& npm i -g npm
RUN chown -R www-data:www-data \
/var/www/storage \
/var/www/bootstrap/cache
# set php
ADD ./serverConfiguration/php.ini /usr/local/etc/php/
EXPOSE 9000
ADD ./scripts/startup.sh /usr/bin/
RUN chmod -v +x /usr/bin/startup.sh
CMD ["/usr/bin/startup.sh"]