-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcaptain-definition-old
61 lines (60 loc) · 2.69 KB
/
captain-definition-old
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
{
"schemaVersion": 2,
"dockerfileLines": [
"# To change this license header, choose License Headers in Project Properties.",
"# To change this template file, choose Tools | Templates",
"# and open the template in the editor.",
"FROM php:7.2-apache as common",
"# Copy our application",
"COPY . /var/www/html/",
"# Allow Composer to be run as root",
"ENV COMPOSER_ALLOW_SUPERUSER 1",
"# Install composer dependencies",
"#RUN echo pwd: 'pwd' && echo ls: 'ls' ",
"# Install Composer and make it available in the PATH",
"RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer",
"# In this image we will download the dependencies, but without the development dependencies.",
"# The dependencies are installed in the vendor folder that will be copied later into the prod image.",
"FROM composer as builder-prod",
"WORKDIR /app",
"COPY composer.json composer.lock /app/",
"RUN composer install \\",
" --ignore-platform-reqs \\",
" --no-ansi \\",
" --no-dev \\",
" --no-autoloader \\",
" --no-interaction \\",
" --no-scripts",
"# We need to copy our whole application so that we can generate the autoload file inside the vendor folder.",
"COPY . /app/",
"#RUN echo pwd: 'pwd' && echo ls: 'ls'",
"#RUN docker-php-ext-install pdo pdo_mysql",
"#RUN apt-get install -y zlib1g-dev libicu-dev g++",
"#RUN docker-php-ext-configure intl",
"#RUN docker-php-ext-install intl",
"#RUN docker-php-ext-install mbstring",
"#RUN docker-php-ext-install bcmath",
"#RUN docker-php-ext-install mcrypt",
"#RUN docker-php-ext-install zip",
"#RUN docker-php-ext-install exif",
"#RUN docker-php-ext-install soap",
"#RUN docker-php-ext-install opcache",
"#RUN docker-php-ext-install iconv",
"#RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/",
"#RUN docker-php-ext-install gd",
"RUN composer dump-autoload --optimize --no-dev --classmap-authoritative",
"# This is the image that will be deployed on production.",
"FROM common as prod",
"# No display errors to users in production.",
"ENV DISPLAY_ERRORS=\"Off\"",
"# Copy the downloaded dependencies from the builder-prod stage.",
"COPY --from=builder-prod /app/vendor /var/www/html/vendor",
"ADD vhosts.conf /etc/apache2/sites-available/000-default.conf",
"# Add main start script for when image launches",
"ADD run.sh /usr/local/bin/run.sh",
"RUN chmod 0755 /usr/local/bin/run.sh",
"WORKDIR /usr/local/bin",
"EXPOSE 80",
"CMD [\"/run.sh\"]"
]
}