-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (25 loc) · 1.06 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
FROM php:8.4-cli AS build
ARG NODE_VERSION=22
# Install Node (will need this to build the styles)
RUN apt-get update && apt-get upgrade -y && \
mkdir -p /etc/apt/keyrings && \
apt-get install -y gnupg gosu curl ca-certificates zip unzip && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y nodejs && \
npm install -g npm && \
rm -rf /var/lib/apt/lists /var/cache/apt/archives
# Install Composer...
COPY --from=composer /usr/bin/composer /usr/bin/composer
# Site lives here
WORKDIR /site
# Copy files...
COPY --link . .
# Install Jigsaw dependencies and build the site...
RUN composer install && npm install && npm run prod
FROM nginx:1-alpine
WORKDIR /site
COPY --from=build /site/build_production /site
COPY ./config/server.conf /etc/nginx/conf.d/default.conf
EXPOSE 80