-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
66 lines (48 loc) · 1.52 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
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM php:8.0-fpm
LABEL maintainer="Mohammad Rahmani <rto1680@gmail.com>"
RUN apt-get update
RUN apt install -y apt-utils
# Install dependencies
RUN apt-get install -qq -y \
curl \
git \
libzip-dev \
zlib1g-dev \
zip unzip
RUN apt install -y libmcrypt-dev libicu-dev libxml2-dev
RUN apt-get install -y libjpeg-dev libpng-dev libfreetype6-dev libjpeg62-turbo-dev
RUN docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/
RUN docker-php-ext-install gd
RUN apt install -y libmagickwand-dev --no-install-recommends && \
pecl install imagick && docker-php-ext-enable imagick
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Install extensions
RUN docker-php-ext-install \
bcmath \
pdo_mysql \
pcntl \
zip \
pdo \
ctype \
tokenizer \
fileinfo \
xml \
intl
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer && chmod +x /usr/local/bin/composer
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
ENV NODE_VERSION=15.4.0
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
COPY . /var/www
WORKDIR /var/www
Run npm install
RUN chown -R www-data:www-data /var/www
RUN chmod -R 755 /var/www/storage
CMD php-fpm