sort now just copies to same filesystem
adjusted to run on kubernetes
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
# Create working directory
|
||||
RUN mkdir -p /app
|
||||
RUN mkdir -p /app && mkdir /gallery
|
||||
|
||||
# Create and set user
|
||||
RUN useradd -u 1000 -d /app -UM appuser
|
||||
@ -12,7 +12,10 @@ RUN apt-get update \
|
||||
&& apt-get clean
|
||||
|
||||
# Chown appuser home
|
||||
RUN chown -R appuser:appuser /app && chmod 750 /app
|
||||
RUN chown -R appuser:appuser /app \
|
||||
&& chown -R appuser:appuser /gallery \
|
||||
&& chmod 750 /app \
|
||||
&& chmod 775 /gallery
|
||||
|
||||
# Switch to appuser
|
||||
USER appuser
|
||||
@ -33,5 +36,7 @@ RUN pip install -r /app/requirements.txt
|
||||
# Copy the sort.py file to the working directory
|
||||
COPY sort.py /app/sort.py
|
||||
|
||||
VOLUME /gallery
|
||||
|
||||
# Set the entry point to sort.py
|
||||
ENTRYPOINT ["python", "/app/sort.py"]
|
Reference in New Issue
Block a user