generated from JBZoo/Skeleton-PHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (34 loc) · 1.33 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
#
# JBZoo Toolbox - Mock-Server
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @package Mock-Server
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @link https://github.com/JBZoo/Mock-Server
#
FROM php:7.4-cli-alpine
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions \
&& sync \
&& install-php-extensions \
opcache \
zip \
gd \
pcntl \
ev \
@composer
COPY . /app
RUN cd /app \
&& composer install --no-dev --optimize-autoloader --no-progress \
&& chmod +x /app/jbzoo-mock-server \
&& /app/jbzoo-mock-server --help
ENV MOCK_SERVER_IN_DOCKER=1
VOLUME /app/mocks
EXPOSE 8089 8090
ENTRYPOINT ["/app/jbzoo-mock-server"]
#HEALTHCHECK --interval=30s --timeout=3s --start-period=3s --retries=2 CMD curl -f http://localhost:8089 || exit 1