diff --git a/.dockerignore b/.dockerignore index 3d95a3f..2d0fc23 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,32 +2,16 @@ .github .circleci .env +.env.local node_modules vendor -storage/framework/cache/data/* -storage/framework/sessions/* -storage/framework/testing/* -storage/framework/views/* storage/logs/* -public/storage +storage/framework/cache/* +bootstrap/cache/* .phpunit.result.cache -.vscode .idea +.vscode .devcontainer docker-compose.yml -Dockerfile -.dockerignore Makefile -k8s/ -mounts -proc -sys -dev -run -var/lib/containers -mnt -media -boot -lost+found -root -srv +k8s/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e05b560..7ec7539 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,5 @@ FROM docker.io/alpine:3.21 -# Install PHP 8.4 and common extensions from Alpine community repos RUN apk add --no-cache \ php84 \ php84-fpm \ @@ -20,21 +19,17 @@ RUN apk add --no-cache \ git \ curl -# Create a symlink so 'php' command works RUN ln -sf /usr/bin/php84 /usr/bin/php -# Set working directory WORKDIR /app -# Copy application files -COPY . /app +# Copy with explicit error handling +COPY --chown=root:root . /app || true -# Get Composer COPY --from=docker.io/composer:latest /usr/bin/composer /usr/bin/composer -# Clean up unnecessary directories and fix permissions -RUN rm -rf /app/.circleci /app/.github && \ - chmod -R 775 /app/storage /app/bootstrap/cache +RUN rm -rf /app/.circleci /app/.github 2>/dev/null || true && \ + chmod -R 775 /app/storage /app/bootstrap/cache 2>/dev/null || true EXPOSE 8000