-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
78 lines (59 loc) · 2.03 KB
/
Dockerfile
File metadata and controls
78 lines (59 loc) · 2.03 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
ARG PHP_VERSION=8.2
FROM php:${PHP_VERSION}-fpm AS php
RUN apt-get update && apt-get install -y \
build-essential \
libzip-dev \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
locales \
zip \
jpegoptim optipng pngquant gifsicle \
vim \
unzip \
git \
supervisor \
cron \
libicu-dev \
nano
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y locales \
&& sed -i -e 's/# ru_RU.UTF-8 UTF-8/ru_RU.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
&& update-locale LANG=ru_RU.UTF-8
ENV LANG ru_RU.UTF-8
ENV LC_ALL ru_RU.UTF-8
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN docker-php-source extract \
&& docker-php-ext-install bcmath exif pcntl pdo_mysql zip sockets \
# Seems line --with-png is not required since PHP 7.4 https://github.com/docker-library/php/issues/912#issuecomment-559918036
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd \
&& docker-php-ext-configure intl \
&& docker-php-ext-install intl \
&& pecl install redis-5.3.4 \
&& docker-php-ext-enable redis \
&& docker-php-source delete
RUN apt-get update && apt-get install default-mysql-client -y
RUN docker-php-ext-configure opcache --enable-opcache \
&& docker-php-ext-install opcache
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# add supervisor config
COPY docker/php/supervisord.conf /etc/supervisord.conf
# add crontab
COPY docker/php/crontab /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
COPY docker/php/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www
ENTRYPOINT ["docker-entrypoint"]
CMD ["php-fpm"]
COPY backend .
FROM golang:1.12-alpine AS golang
RUN apk update && apk upgrade && \
apk add --no-cache bash git openssh
WORKDIR /app
COPY golang .
RUN chmod 775 server_go
CMD ["./server_go"]