Skip to content

fix(pelican): use alpine for install container to prevent stuck installation#358

Merged
fank merged 1 commit intomainfrom
fix/pelican-install-container
Mar 23, 2026
Merged

fix(pelican): use alpine for install container to prevent stuck installation#358
fank merged 1 commit intomainfrom
fix/pelican-install-container

Conversation

@fank
Copy link
Member

@fank fank commented Mar 23, 2026

Summary

  • Switch the egg's installation container from ghcr.io/ocap2/web:full to alpine:3.23
  • Add chown -R 999:999 /mnt/server to fix file ownership after directory creation

Problem

Pelican Wings does not override the Docker ENTRYPOINT when running the installation container (source). It only sets Cmd:

conf := &container.Config{
    Cmd:   []string{ip.Script.Entrypoint, "/mnt/install/install.sh"},
    Image: ip.Script.ContainerImage,
    // Entrypoint is NOT set → Docker uses image's ENTRYPOINT
}

Since the OCAP image has ENTRYPOINT ["/entrypoint.sh"], and Wings passes STARTUP in the environment during installation, the entrypoint detected Pelican mode and ran eval "$STARTUP" — starting the OCAP server instead of the install script. The server ran indefinitely, so installation never completed and the Panel stayed stuck on "Installing".

Additionally, the install container runs as root, creating directories owned by root:root. The server container runs as UID 999, so it cannot write to those directories (pelican-dev/panel#2098).

Test plan

  • Import the updated egg into Pelican Panel
  • Create a new server from the egg — installation should complete within seconds
  • Verify server transitions from "Installing" → "Starting" → "Running"
  • Verify the server can write to /home/container/data, /home/container/db, /home/container/maps

…llation

Wings does not override the Docker ENTRYPOINT when running the
installation container (pelican-dev/wings server/install.go). Since the
OCAP image has a custom entrypoint that checks for $STARTUP — which
Wings also passes during installation — the entrypoint started the OCAP
server instead of executing the install script. The server ran
indefinitely, so installation never completed.

Switch to a plain alpine:3.23 image with no custom ENTRYPOINT so the
install script runs directly.

Also add chown -R 999:999 /mnt/server to fix file ownership. The
install container runs as root but the server container runs as UID 999,
so without the chown the server cannot write to its data directories.
See pelican-dev/panel#2098
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request resolves critical issues preventing successful server installation and operation for Pelican Wings. It addresses a problem where the installation process would get stuck indefinitely by switching to a minimal Alpine Linux container, thereby avoiding an unintended ENTRYPOINT execution. Additionally, it fixes a file permission error by ensuring that directories created during installation are correctly owned by the server's user ID, allowing the server to write to its data directories.

Highlights

  • Installation Container: Switched the installation container image from "ghcr.io/ocap2/web:full" to "alpine:3.23" to prevent the server from getting stuck during installation due to an unintended ENTRYPOINT execution.
  • File Ownership Fix: Added a "chown -R 999:999 /mnt/server" command to the installation script to correct file ownership, allowing the server container (running as UID 999) to write to persistent directories.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request addresses a stuck installation issue by switching to an Alpine-based installation container and corrects file ownership problems. The approach is sound. However, a critical issue has been identified: the specified Alpine image version 3.23 does not exist, which will cause the installation to fail. This appears to be a typo that needs correction.

@fank fank merged commit b8aee0c into main Mar 23, 2026
2 checks passed
@fank fank deleted the fix/pelican-install-container branch March 23, 2026 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant