[PR #894] [CLOSED] Speed up Docker build and fix entrypoint permissions #1037

Closed
opened 2026-02-04 19:12:12 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/pelican-dev/panel/pull/894
Author: @PseudoResonance
Created: 1/8/2025
Status: Closed

Base: mainHead: fix-docker-entrypoint-permissions


📝 Commits (4)

  • ac6739c Speed up Docker build and fix entrypoint permissions
  • 84c2bb5 Update Docker build for Vite
  • c57a0fe Include license in image
  • 0c59e3c Shorten docker compose build and remove unnecessary filament/actions

📊 Changes

4 files changed (+35 additions, -22 deletions)

View changed files

📝 .dockerignore (+12 -0)
📝 .github/docker/entrypoint.sh (+3 -3)
📝 Dockerfile (+19 -19)
📝 compose.yml (+1 -0)

📄 Description

The Docker entrypoint script runs artisan commands as root, which creates directories under storage/framework/cache/data that are owned by root. This causes errors when running the panel, as it's unable to write to parts of the cache. By running the commands as www-data instead, the permissions are kept unaffected.

I added the Dockerfile to the compose file, so that the image can easily be built from source if desired.

As the yarn install command can take a long time, I changed the Dockerfile to copy just the necessary package/yarn files for the installation first. Once that is completed, it copies the rest and builds the app. This sped up cached builds on my computer by about 80 seconds.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/pelican-dev/panel/pull/894 **Author:** [@PseudoResonance](https://github.com/PseudoResonance) **Created:** 1/8/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-docker-entrypoint-permissions` --- ### 📝 Commits (4) - [`ac6739c`](https://github.com/pelican-dev/panel/commit/ac6739c74f13332578d7fbb687eb41062eb8e26c) Speed up Docker build and fix entrypoint permissions - [`84c2bb5`](https://github.com/pelican-dev/panel/commit/84c2bb5e1be17f776bda755b5ec2e5cc72e5b5e4) Update Docker build for Vite - [`c57a0fe`](https://github.com/pelican-dev/panel/commit/c57a0fe7c62fba66731aa7281aa3da1a84c16d31) Include license in image - [`0c59e3c`](https://github.com/pelican-dev/panel/commit/0c59e3c0e5070f8a5d2ff762a2a9f5af2dc027ec) Shorten docker compose build and remove unnecessary filament/actions ### 📊 Changes **4 files changed** (+35 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `.dockerignore` (+12 -0) 📝 `.github/docker/entrypoint.sh` (+3 -3) 📝 `Dockerfile` (+19 -19) 📝 `compose.yml` (+1 -0) </details> ### 📄 Description The Docker entrypoint script runs artisan commands as root, which creates directories under `storage/framework/cache/data` that are owned by root. This causes errors when running the panel, as it's unable to write to parts of the cache. By running the commands as www-data instead, the permissions are kept unaffected. I added the Dockerfile to the compose file, so that the image can easily be built from source if desired. As the `yarn install` command can take a long time, I changed the Dockerfile to copy just the necessary package/yarn files for the installation first. Once that is completed, it copies the rest and builds the app. This sped up cached builds on my computer by about 80 seconds. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-04 19:12:12 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel#1037