- Dockerfile +4 -0
Dockerfile
CHANGED
|
@@ -28,6 +28,10 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 28 |
# Copy the rest of the application with correct ownership
|
| 29 |
COPY --chown=user . .
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
USER user
|
| 32 |
ENV HOME=/home/user \
|
| 33 |
PATH=/home/user/.local/bin:$PATH
|
|
|
|
| 28 |
# Copy the rest of the application with correct ownership
|
| 29 |
COPY --chown=user . .
|
| 30 |
|
| 31 |
+
# Create directories that are not copied but required (e.g. implicitly created by app)
|
| 32 |
+
# and ensure they are owned by user.
|
| 33 |
+
RUN mkdir -p data temp logs && chown -R user:user data temp logs
|
| 34 |
+
|
| 35 |
USER user
|
| 36 |
ENV HOME=/home/user \
|
| 37 |
PATH=/home/user/.local/bin:$PATH
|