bulk-watermark-app / Dockerfile
limenous's picture
fix: update Dockerfile to fix permissions for watermarked images directory
fa838cb
raw
history blame contribute delete
800 Bytes
# Use an official Python runtime as a parent image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Copy the current directory contents into the container at /app
COPY . /app
# Create the directory and set permissions
RUN mkdir -p /app/static/watermarked_images && \
chmod 777 /app/static/watermarked_images
# Install the dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Set environment variables
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV PORT=7860
# Install system fonts
RUN apt-get update && apt-get install -y \
fonts-liberation \
&& rm -rf /var/lib/apt/lists/*
# Expose the port the app runs on
EXPOSE 7860
# Define the command to run your app using Gunicorn
CMD ["sh", "-c", "gunicorn app:app --bind 0.0.0.0:$PORT"]