Skip to content

Commit 2fd9103

Browse files
committed
Dockerfile: use unprivileged nginx
This allows running this container w/ arbitrary uid support
1 parent b0b31e7 commit 2fd9103

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

CI/e2e/docker-compose.e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ services:
4848
build:
4949
context: .
5050
ports:
51-
- 4200:80
51+
- 4200:8080
5252
volumes:
5353
- "./CI/e2e/frontend.config.e2e.json:/usr/share/nginx/html/assets/config.json"
5454
depends_on:

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ RUN npm ci
88
COPY . /frontend/
99
RUN npx ng build
1010

11-
FROM nginx:1.25-alpine
12-
RUN rm -rf /usr/share/nginx/html/*
11+
FROM nginxinc/nginx-unprivileged
1312
COPY --from=builder /frontend/dist/ /usr/share/nginx/html/
14-
COPY scripts/nginx.conf /etc/nginx/nginx.conf
15-
EXPOSE 80
13+
EXPOSE 8080

scripts/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ http {
3131
default_type application/octet-stream;
3232

3333
server {
34-
listen 80 default_server;
35-
listen [::]:80 default_server;
34+
listen 8080 default_server;
35+
listen [::]:8080 default_server;
3636
server_name _;
3737
root /usr/share/nginx/html;
3838

0 commit comments

Comments
 (0)