Spaces:
Runtime error
Runtime error
Download Dockerfile from Alcazard/vibe-coding-api: direct link, hf CLI and curl.
- Browser
- Download file 913 Bytes
-
https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Alcazard/vibe-coding-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/Dockerfile
913 Bytes
| FROM php:8.2-apache | |
| # Installer les extensions nécessaires | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| curl \ | |
| libpng-dev \ | |
| libonig-dev \ | |
| libxml2-dev \ | |
| zip \ | |
| unzip \ | |
| && docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd | |
| # Installer Composer | |
| COPY --from=composer:latest /usr/bin/composer /usr/bin/composer | |
| # Copier les fichiers du projet | |
| COPY . /var/www/html | |
| # Donner les permissions | |
| RUN chown -R www-data:www-data /var/www/html/var | |
| # Activer mod_rewrite (pour Symfony) | |
| RUN a2enmod rewrite | |
| # Configuration du dossier public | |
| ENV APACHE_DOCUMENT_ROOT /var/www/html/public | |
| RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf | |
| RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf | |
| WORKDIR /var/www/html | |
| RUN composer install --no-dev --optimize-autoloader |