Spaces:
Running
Running
BinaryONe
commited on
Commit
·
7bdea2a
1
Parent(s):
5604924
Nginx Changes-Over Alpine
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
@@ -4,6 +4,12 @@ FROM alpine:latest
|
|
4 |
RUN apk update && apk upgrade && \
|
5 |
apk add --no-cache nginx python3 py3-pip build-base libffi-dev openssl-dev shadow
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
# Create a group and user
|
8 |
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
9 |
|
@@ -24,8 +30,8 @@ RUN python3 -m venv /app/venv
|
|
24 |
RUN source /app/venv/bin/activate
|
25 |
|
26 |
# Install Python dependencies from the requirements file within the virtual environment
|
27 |
-
|
28 |
-
RUN pip install -r requirements.txt
|
29 |
|
30 |
|
31 |
# Set ownership of the app directory
|
|
|
4 |
RUN apk update && apk upgrade && \
|
5 |
apk add --no-cache nginx python3 py3-pip build-base libffi-dev openssl-dev shadow
|
6 |
|
7 |
+
# Install python/pip
|
8 |
+
ENV PYTHONUNBUFFERED=1
|
9 |
+
RUN apk add --update --no-cache python3 && ln -sf python3 /usr/bin/python
|
10 |
+
RUN python3 -m ensurepip
|
11 |
+
RUN pip3 install --no-cache --upgrade pip setuptools
|
12 |
+
|
13 |
# Create a group and user
|
14 |
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
15 |
|
|
|
30 |
RUN source /app/venv/bin/activate
|
31 |
|
32 |
# Install Python dependencies from the requirements file within the virtual environment
|
33 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
34 |
+
#RUN pip install -r requirements.txt
|
35 |
|
36 |
|
37 |
# Set ownership of the app directory
|