dockerfile 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. FROM ubuntu:24.04
  2. WORKDIR /app
  3. RUN apt-get update && apt-get upgrade -y
  4. RUN apt-get install software-properties-common -y
  5. RUN apt-get update && apt-get install -y
  6. RUN add-apt-repository universe
  7. RUN apt-get install python3.12-venv -y
  8. RUN apt-get install which gcc -y
  9. # Needed for opencv
  10. RUN apt-get install ffmpeg libsm6 libxext6 git -y
  11. RUN apt-get install imagemagick potrace -y
  12. RUN add-apt-repository ppa:inkscape.dev/stable
  13. RUN apt-get install -y inkscape scour pngquant jpegoptim
  14. RUN apt-get install libcairo2-dev pkg-config python3-dev libgirepository-2.0-dev -y
  15. ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
  16. RUN git clone https://framagit.org/Marc-AntoineA/files-manipulator.git files-manipulator
  17. RUN python3 -m venv venv
  18. RUN . venv/bin/activate && pip install files-manipulator/images-manipulator
  19. COPY requirements.txt ./requirements.txt
  20. RUN . venv/bin/activate && pip install -r requirements.txt
  21. COPY . /app
  22. CMD . venv/bin/activate && uwsgi --socket 0.0.0.0:4000 --protocol http -w wsgi:application
  23. EXPOSE 4000