Spaces:
Running
Running
BinaryONe
commited on
Commit
·
9576da4
1
Parent(s):
a11228a
Nginx Changes-Over Alpine
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
@@ -2,11 +2,13 @@ FROM alpine:latest
|
|
2 |
|
3 |
# Install system dependencies
|
4 |
RUN apk update && apk upgrade && \
|
5 |
-
apk add --no-cache nginx python3 python3-dev py3-pip build-base libffi-dev openssl-dev shadow gcc musl-dev ca-certificates
|
6 |
|
7 |
# Create a group and user
|
8 |
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
9 |
|
|
|
|
|
10 |
# Set working directory
|
11 |
WORKDIR /app
|
12 |
|
@@ -22,7 +24,7 @@ COPY . /app
|
|
22 |
|
23 |
# Copy Nginx config
|
24 |
COPY default_conf.conf /etc/nginx/conf.d/default.conf
|
25 |
-
COPY nginx.conf /etc/nginx/nginx.conf
|
26 |
|
27 |
#RUN touch /var/lib/nginx/logs/error.log && \
|
28 |
# chmod 777 /var/lib/nginx/logs/error.log
|
|
|
2 |
|
3 |
# Install system dependencies
|
4 |
RUN apk update && apk upgrade && \
|
5 |
+
apk add --no-cache nginx python3 python3-dev py3-pip build-base libffi-dev openssl-dev shadow gcc musl-dev ca-certificates sudo
|
6 |
|
7 |
# Create a group and user
|
8 |
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
9 |
|
10 |
+
# Add appuser to the sudoers file (allowing all commands without password)
|
11 |
+
RUN echo "appuser ALL=(ALL:ALL) ALL" >> /etc/sudoers
|
12 |
# Set working directory
|
13 |
WORKDIR /app
|
14 |
|
|
|
24 |
|
25 |
# Copy Nginx config
|
26 |
COPY default_conf.conf /etc/nginx/conf.d/default.conf
|
27 |
+
#COPY nginx.conf /etc/nginx/nginx.conf
|
28 |
|
29 |
#RUN touch /var/lib/nginx/logs/error.log && \
|
30 |
# chmod 777 /var/lib/nginx/logs/error.log
|