lychee.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Environment variables
  2. ARG PUID
  3. ARG PGID
  4. ARG USER
  5. ARG PHP_TZ
  6. FROM console:latest
  7. ARG PUID
  8. ARG PGID
  9. ARG USER
  10. ARG PHP_TZ
  11. # Install base dependencies, add user and group, install php libraries
  12. RUN apt update -y
  13. RUN apt upgrade -qy
  14. RUN apt install -qy --no-install-recommends ca-certificates curl apt-transport-https
  15. RUN curl -sSLo /tmp/debsuryorg-archive-keyring.deb https://packages.sury.org/debsuryorg-archive-keyring.deb
  16. RUN dpkg -i /tmp/debsuryorg-archive-keyring.deb
  17. RUN sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ trixie main" > /etc/apt/sources.list.d/php.list'
  18. RUN apt update
  19. RUN apt install -qy --no-install-recommends \
  20. adduser \
  21. nginx-light \
  22. php8.4-mysql \
  23. php8.4-pgsql \
  24. php8.4-sqlite3 \
  25. php8.4-imagick \
  26. php8.4-mbstring \
  27. php8.4-gd \
  28. php8.4-xml \
  29. php8.4-zip \
  30. php8.4-fpm \
  31. php8.4-redis \
  32. php8.4-bcmath \
  33. php8.4-intl \
  34. libimage-exiftool-perl \
  35. ffmpeg \
  36. jpegoptim \
  37. optipng \
  38. pngquant \
  39. gifsicle \
  40. webp \
  41. unzip
  42. RUN addgroup --gid "$PGID" "$USER"
  43. RUN adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER"
  44. #COPY nginx.conf /etc/nginx/nginx.conf
  45. COPY start.sh /root/start.sh
  46. RUN chmod +x /root/start.sh
  47. RUN apt install -y git
  48. RUN cd /var/www/html && git clone https://github.com/LycheeOrg/Lychee.git
  49. RUN apt install composer -y
  50. RUN cd /var/www/html/Lychee && composer install --no-dev
  51. RUN apt install npm -y
  52. RUN cd /var/www/html/Lychee && npm install && npm run build
  53. CMD ["/start.sh"]