File tree Expand file tree Collapse file tree 3 files changed +34
-23
lines changed Expand file tree Collapse file tree 3 files changed +34
-23
lines changed Original file line number Diff line number Diff line change 1
- FROM php:7.2-fpm-alpine
1
+ # the different stages of this Dockerfile are meant to be built into separate images
2
+ # https://docs.docker.com/compose/compose-file/#target
3
+
4
+ ARG PHP_VERSION=7.2
5
+ ARG NGINX_VERSION=1.15
6
+
7
+ # ## NGINX
8
+ FROM nginx:${NGINX_VERSION}-alpine AS symfony_docker_nginx
9
+
10
+ COPY docker/nginx/conf.d /etc/nginx/conf.d/
11
+ COPY public /srv/app/public/
12
+
13
+ # ## H2 PROXY
14
+ FROM alpine:latest AS symfony_docker_h2-proxy
15
+
16
+ RUN apk add --no-cache openssl
17
+
18
+ # Use this self-generated certificate only in dev, IT IS NOT SECURE!
19
+ RUN openssl genrsa -des3 -passout pass:NotSecure -out server.pass.key 2048
20
+ RUN openssl rsa -passin pass:NotSecure -in server.pass.key -out server.key
21
+ RUN rm server.pass.key
22
+ RUN openssl req -new -passout pass:NotSecure -key server.key -out server.csr \
23
+ -subj '/C=SS/ST=SS/L=Gotham City/O=Symfony/CN=localhost'
24
+ RUN openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt
25
+
26
+ FROM nginx:${NGINX_VERSION}-alpine
27
+
28
+ RUN mkdir -p /etc/nginx/ssl/
29
+ COPY --from=symfony_docker_h2-proxy server.key server.crt /etc/nginx/ssl/
30
+ COPY ./docker/h2-proxy/default.conf /etc/nginx/conf.d/default.conf
31
+
32
+ # ## PHP
33
+ FROM php:${PHP_VERSION}-fpm-alpine AS symfony_docker_php
2
34
3
35
RUN apk add --no-cache --virtual .persistent-deps \
4
36
git \
5
37
icu-libs \
6
38
zlib
7
39
8
40
ENV APCU_VERSION 5.1.11
9
- RUN set -xe \
41
+ RUN set -eux \
10
42
&& apk add --no-cache --virtual .build-deps \
11
43
$PHPIZE_DEPS \
12
44
icu-dev \
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments