-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
49 lines (39 loc) · 1.36 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
#FROM node:16-alpine AS node
#
#RUN apk add --no-cache --virtual .gyp \
# autoconf \
# automake \
# bash \
# g++ \
# libc6-compat \
# libjpeg-turbo-dev \
# libpng-dev \
# make \
# libtool \
# nasm
#
#WORKDIR /usr/src/html/public/wp-content/themes/<PUT YOUR THEME NAME HERE>/
#
#COPY ./public/wp-content/themes/<PUT YOUR THEME NAME HERE>/ ./
#
#RUN npm i \
# && npm run build \
# && apk del .gyp
FROM ghcr.io/wp-digital/docker-php/php-8.2-newrelic-10.7.0.319:latest
ARG NEWRELIC_LICENSE
ARG COMPOSER_TOKEN
ARG METABOX_API_KEY
ARG YOAST_TOKEN
ENV NEWRELIC_LICENSE=$NEWRELIC_LICENSE
RUN if [ -n "${COMPOSER_TOKEN}" ]; then composer config -g github-oauth.github.com ${COMPOSER_TOKEN}; fi
RUN if [ -n "${METABOX_API_KEY}" ]; then composer config -g repositories.metabox\.io composer "https://packages.metabox.io/${METABOX_API_KEY}"; fi
RUN if [ -n "${YOAST_TOKEN}" ]; then composer config -g http-basic.my.yoast.com token "${YOAST_TOKEN}"; fi
WORKDIR /usr/src/html
COPY . ./
RUN composer install -o -n --no-dev
#COPY --from=node /usr/src/html/public/wp-content/themes/<PUT YOUR THEME NAME HERE>/assets/build/ ./public/wp-content/themes/<PUT YOUR THEME NAME HERE>/assets/build/
RUN echo "" > ./.env
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
RUN chmod +x ./bin/bump-assets-version
RUN chmod +x ./bin/run-wp-cron
RUN chown -R www-data:www-data ./