Krishna Prakash
commited on
Commit
·
8f64a95
1
Parent(s):
3acb78d
Pre-create app.log file to fix logging configuration error
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
# Use official Python 3.
|
2 |
-
FROM python:3.
|
3 |
|
4 |
# Set working directory to /app (root of the repository)
|
5 |
WORKDIR /app
|
@@ -13,8 +13,9 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt loguru
|
|
13 |
# Copy the entire project
|
14 |
COPY . /app
|
15 |
|
16 |
-
# Create user if it doesn't exist, then switch to it
|
17 |
RUN id -u user &>/dev/null || useradd -m -u 1000 user
|
|
|
18 |
USER user
|
19 |
ENV HOME=/home/user \
|
20 |
PATH=/home/user/.local/bin:$PATH
|
|
|
1 |
+
# Use official Python 3.1 image
|
2 |
+
FROM python:3.2
|
3 |
|
4 |
# Set working directory to /app (root of the repository)
|
5 |
WORKDIR /app
|
|
|
13 |
# Copy the entire project
|
14 |
COPY . /app
|
15 |
|
16 |
+
# Create user if it doesn't exist, then switch to it and pre-create log file
|
17 |
RUN id -u user &>/dev/null || useradd -m -u 1000 user
|
18 |
+
RUN mkdir -p /home/user && touch /home/user/app.log && chown user:user /home/user/app.log
|
19 |
USER user
|
20 |
ENV HOME=/home/user \
|
21 |
PATH=/home/user/.local/bin:$PATH
|