This repository was archived by the owner on Apr 21, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.idea /
2- .next /
3- dist /
4- www /LandingPage-Example
5-
62* .log
3+ node_modules /
4+ public /
5+ Dockerfile
Original file line number Diff line number Diff line change 1- FROM nginx:1 -alpine
1+ FROM node:12 -alpine AS builder
22
3- COPY src/www /usr/share/nginx/html
3+ ENV GATSBY_TELEMETRY_DISABLED=1
44
5- RUN chmod -R a+rX /usr/share/nginx/html
5+ WORKDIR /build
6+ COPY package.json package-lock.json ./
7+ RUN npm ci
8+
9+ COPY . /build/
10+ RUN npm run build
11+
12+ # All the Modifications are from from https://github.com/torstenwalter/openshift-nginx
13+ FROM nginx:stable-alpine
14+
15+ # support running as arbitrary user which belogs to the root group
16+ RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx
17+ RUN chgrp -R root /var/cache/nginx
18+
19+ # users are not allowed to listen on priviliged ports
20+ RUN sed -i.bak 's/listen\( .*\) 80;/listen 8081;/' /etc/nginx/conf.d/default.conf
21+ EXPOSE 8081
22+
23+ # comment user directive as master process is run as user in OpenShift anyhow
24+ RUN sed -i.bak 's/^user/#user/' /etc/nginx/nginx.conf
25+
26+ RUN addgroup nginx root
27+ USER nginx
28+
29+ COPY --from=builder /build/public /usr/share/nginx/html
You can’t perform that action at this time.
0 commit comments