fix: move Chromium download to Docker build phase
- Download Chromium from Google snapshots during Docker build (network works there) - Chroot hook now only verifies and installs runtime dependencies - Remove generated files from repo (OVMF_VARS.fd, qemu.pid, screenshots) - Update isotest scripts to use .nogit/ directory structure - Chromium kiosk verified working with Sway compositor
This commit is contained in:
@@ -51,6 +51,20 @@ COPY ecoos_daemon/ /daemon/
|
||||
# Bundle the daemon
|
||||
RUN cd /daemon && deno compile --allow-all --output /build/daemon-bundle/eco-daemon mod.ts
|
||||
|
||||
# Download Chromium during Docker build (network works here, not in chroot hooks)
|
||||
RUN echo "Downloading Chromium from official snapshots..." && \
|
||||
cd /tmp && \
|
||||
LATEST=$(curl -fsSL "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media" 2>/dev/null || echo "1368529") && \
|
||||
echo "Using Chromium build: $LATEST" && \
|
||||
curl -fsSL "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${LATEST}%2Fchrome-linux.zip?alt=media" -o chromium.zip || \
|
||||
curl -fsSL "https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1368529%2Fchrome-linux.zip?alt=media" -o chromium.zip && \
|
||||
mkdir -p /build/chromium && \
|
||||
unzip -q chromium.zip -d /tmp && \
|
||||
mv /tmp/chrome-linux/* /build/chromium/ && \
|
||||
rm -rf chromium.zip /tmp/chrome-linux && \
|
||||
chmod +x /build/chromium/chrome && \
|
||||
echo "Chromium downloaded to /build/chromium/"
|
||||
|
||||
# Make scripts executable
|
||||
RUN chmod +x /build/scripts/*.sh
|
||||
|
||||
@@ -102,6 +116,22 @@ mkdir -p config/includes.chroot/etc/systemd/system
|
||||
cp /build/daemon-bundle/eco-daemon config/includes.chroot/opt/eco/bin/
|
||||
chmod +x config/includes.chroot/opt/eco/bin/eco-daemon
|
||||
|
||||
# Copy pre-downloaded Chromium
|
||||
echo "Installing pre-downloaded Chromium into chroot..."
|
||||
mkdir -p config/includes.chroot/opt/chromium
|
||||
cp -r /build/chromium/* config/includes.chroot/opt/chromium/
|
||||
chmod +x config/includes.chroot/opt/chromium/chrome
|
||||
|
||||
# Create symlinks for chromium-browser command
|
||||
mkdir -p config/includes.chroot/usr/bin
|
||||
cat > config/includes.chroot/usr/bin/chromium-browser << 'CHROMEWRAPPER'
|
||||
#!/bin/sh
|
||||
exec /opt/chromium/chrome "$@"
|
||||
CHROMEWRAPPER
|
||||
chmod +x config/includes.chroot/usr/bin/chromium-browser
|
||||
ln -sf /opt/chromium/chrome config/includes.chroot/usr/bin/chromium
|
||||
echo "Chromium installed to /opt/chromium/"
|
||||
|
||||
# Create dummy isohybrid in chroot (UEFI-only, no BIOS boot record)
|
||||
mkdir -p config/includes.chroot/usr/bin
|
||||
cat > config/includes.chroot/usr/bin/isohybrid << 'ISOHYBRID'
|
||||
|
||||
Reference in New Issue
Block a user