Dockerfile 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. FROM v2cc/proxypanel-base
  2. # Give execution rights on the cron job
  3. RUN mkdir /etc/app_crontab \
  4. # Copy or create your cron file named crontab into the root directory crontab
  5. && chown -R root /etc/app_crontab && chmod -R 0644 /etc/app_crontab
  6. COPY docker/crontab /etc/app_crontab/crontab
  7. # Apply cron job
  8. RUN crontab /etc/app_crontab/crontab
  9. # System V Init scripts
  10. COPY docker/init.d/caddy /etc/init.d/
  11. COPY docker/init.d/queue-worker /etc/init.d/
  12. COPY docker/entrypoint.sh /etc/
  13. COPY docker/wait-for-it.sh /etc/
  14. COPY docker/Caddyfile /etc/caddy/
  15. RUN chmod a+x /etc/init.d/* /etc/entrypoint.sh /etc/wait-for-it.sh
  16. COPY --chown=www-data:www-data . /www/wwwroot/proxypanel
  17. WORKDIR /www/wwwroot/proxypanel
  18. RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
  19. && php -r "if (hash_file('sha384', 'composer-setup.php') === 'c31c1e292ad7be5f49291169c0ac8f683499edddcfd4e42232982d0fd193004208a58ff6f353fde0012d35fdd72bc394') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
  20. && php composer-setup.php \
  21. && php -r "unlink('composer-setup.php');" \
  22. && php composer.phar install --no-ansi --no-dev --no-interaction --no-plugins --no-progress --no-scripts --no-suggest --optimize-autoloader \
  23. && php artisan vendor:publish -n
  24. CMD ["/etc/entrypoint.sh"]