-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (19 loc) · 728 Bytes
/
Dockerfile
File metadata and controls
30 lines (19 loc) · 728 Bytes
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
FROM quay.io/presslabs/wordpress-runtime:bedrock as builder
ARG COMPOSER_AUTH={}
ENV COMPOSER_AUTH=${COMPOSER_AUTH}
USER root
WORKDIR /src
# warm-up composer cache
COPY --chown=www-data:www-data composer.json composer.lock /src/
RUN composer install --no-dev --no-interaction --no-progress --no-ansi --no-scripts
# wipe everything and composer install
COPY --chown=www-data:www-data . /src
RUN composer install --no-dev --no-interaction --no-progress --no-ansi --no-scripts
RUN cp -a /src/. /app
FROM quay.io/presslabs/wordpress-runtime:bedrock
USER root
RUN set -ex \
&& apt-get update \
&& apt-get install --no-install-recommends -y vim
USER www-data
COPY --from=builder --chown=www-data:www-data /app /app