-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (37 loc) · 1.53 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
FROM php:7.4.2-cli
RUN apt-get update && apt-get install -my wget gnupg
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
RUN apt-get update && apt-get -y --no-install-recommends install apt-transport-https
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN apt-get update
RUN ACCEPT_EULA=Y apt-get install -y msodbcsql17
RUN apt-get update && apt-get -y install unixodbc-dev
# Installing dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libpng-dev \
libjpeg62-turbo-dev \
libfreetype6-dev \
locales \
libzip-dev \
zip libonig-dev
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Installing extensions
RUN docker-php-ext-install mbstring zip exif pcntl
RUN pecl install swoole
RUN docker-php-ext-enable swoole
# Setting locales
RUN echo en_US.UTF-8 UTF-8 > /etc/locale.gen && locale-gen
# Allow container to write on host
RUN usermod -u 1000 www-data
RUN wget -O /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64
RUN chmod +x /usr/local/bin/dumb-init
RUN apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python python-pip
RUN python -m pip install pycryptodomex
COPY . /app
ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
WORKDIR /app
CMD ["php", "/app/server.php"]