Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit 685b997

Browse files
author
dpatanin
committed
Merge branch 'new-website' of iteragit.iteratec.de:secureCodeBox/internal/secureCodeBox.io into new-website
2 parents 06ca54c + 9f10b3a commit 685b997

2 files changed

Lines changed: 30 additions & 7 deletions

File tree

.dockerignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.idea/
2-
.next/
3-
dist/
4-
www/LandingPage-Example
5-
62
*.log
3+
node_modules/
4+
public/
5+
Dockerfile

Dockerfile

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
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

0 commit comments

Comments
 (0)