⚝
One Hat Cyber Team
⚝
Your IP:
172.22.0.1
Server IP:
151.80.20.34
Server:
Linux 794f04d97d5e 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64
Server Software:
Apache/2.4.62 (Debian)
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
html
/
Edit File: Dockerfile
FROM php:8.2-apache # Install system dependencies RUN apt-get update && apt-get install -y \ git \ curl \ libpng-dev \ libonig-dev \ libxml2-dev \ zip \ unzip \ libzip-dev \ libfreetype6-dev \ libjpeg62-turbo-dev \ libpng-dev \ nodejs \ npm # Clear cache RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Install PHP extensions RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip # Enable Apache mod_rewrite RUN a2enmod rewrite # Get latest Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Set working directory WORKDIR /var/www/html # Copy application code COPY . /var/www/html # Install dependencies RUN composer install --no-dev --optimize-autoloader # Set permissions RUN chown -R www-data:www-data /var/www/html \ && chmod -R 755 /var/www/html \ && chmod -R 777 /var/www/html/storage \ && chmod -R 777 /var/www/html/bootstrap/cache # Create start script RUN echo '#!/bin/bash' > /usr/local/bin/start.sh \ && echo 'chown -R www-data:www-data /var/www/html' >> /usr/local/bin/start.sh \ && echo 'chmod -R 777 /var/www/html/storage' >> /usr/local/bin/start.sh \ && echo 'chmod -R 777 /var/www/html/bootstrap/cache' >> /usr/local/bin/start.sh \ && echo 'apache2-foreground' >> /usr/local/bin/start.sh \ && chmod +x /usr/local/bin/start.sh # Configure Apache DocumentRoot for Laravel RUN sed -i 's|DocumentRoot /var/www/html|DocumentRoot /var/www/html|g' /etc/apache2/sites-available/000-default.conf \ && echo '<Directory /var/www/html>' >> /etc/apache2/sites-available/000-default.conf \ && echo ' Options Indexes FollowSymLinks' >> /etc/apache2/sites-available/000-default.conf \ && echo ' AllowOverride All' >> /etc/apache2/sites-available/000-default.conf \ && echo ' Require all granted' >> /etc/apache2/sites-available/000-default.conf \ && echo '</Directory>' >> /etc/apache2/sites-available/000-default.conf # Alternative: Create symlink to maintain Laravel public structure (uncomment if preferred) # RUN sed -i 's|DocumentRoot /var/www/html|DocumentRoot /var/www/html/public|g' /etc/apache2/sites-available/000-default.conf \ # && echo '<Directory /var/www/html/public>' >> /etc/apache2/sites-available/000-default.conf \ # && echo ' Options Indexes FollowSymLinks' >> /etc/apache2/sites-available/000-default.conf \ # && echo ' AllowOverride All' >> /etc/apache2/sites-available/000-default.conf \ # && echo ' Require all granted' >> /etc/apache2/sites-available/000-default.conf \ # && echo '</Directory>' >> /etc/apache2/sites-available/000-default.conf \ # && ln -sf /var/www/html/index.php /var/www/html/public/index.php \ # && ln -sf /var/www/html/.htaccess /var/www/html/public/.htaccess # Expose port 80 EXPOSE 80 # Set environment variable ENV COMPOSER_ALLOW_SUPERUSER=1 # Start script CMD ["/usr/local/bin/start.sh"]
Simpan