55 lines
1.3 KiB
Bash
Executable File
55 lines
1.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# Install Chromium dependencies
|
|
# Chromium itself is pre-installed from Docker build (network works there)
|
|
|
|
set -e
|
|
|
|
echo "Installing Chromium dependencies..."
|
|
|
|
# Verify Chromium was pre-installed from Docker build
|
|
if [ ! -x /opt/chromium/chrome ]; then
|
|
echo "ERROR: Chromium not found at /opt/chromium/chrome"
|
|
echo "This should have been installed during Docker build"
|
|
exit 1
|
|
fi
|
|
|
|
# Install required runtime dependencies for Chromium
|
|
# Using --no-install-recommends to minimize size
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
libasound2t64 \
|
|
libatk-bridge2.0-0t64 \
|
|
libatk1.0-0t64 \
|
|
libatspi2.0-0t64 \
|
|
libcairo2 \
|
|
libcups2t64 \
|
|
libdrm2 \
|
|
libgbm1 \
|
|
libgtk-3-0t64 \
|
|
libnspr4 \
|
|
libnss3 \
|
|
libpango-1.0-0 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxfixes3 \
|
|
libxkbcommon0 \
|
|
libxrandr2 \
|
|
fonts-liberation \
|
|
xdg-utils || true
|
|
|
|
# Verify the symlink exists
|
|
if [ ! -x /usr/bin/chromium-browser ]; then
|
|
echo "Creating chromium-browser symlink..."
|
|
cat > /usr/bin/chromium-browser << 'WRAPPER'
|
|
#!/bin/sh
|
|
exec /opt/chromium/chrome "$@"
|
|
WRAPPER
|
|
chmod +x /usr/bin/chromium-browser
|
|
fi
|
|
|
|
echo "Chromium dependencies installed."
|
|
echo "Chromium available at:"
|
|
ls -la /opt/chromium/chrome
|
|
ls -la /usr/bin/chromium-browser
|
|
|
|
echo "Chromium setup complete."
|