This commit is contained in:
Dhruwang
2025-04-30 16:07:21 +05:30
parent 44feb59cfc
commit f0c2d75a4b

View File

@@ -17,24 +17,22 @@ RUN apk update && \
cp -av /usr/lib/libcrypto.so* /edge-packages/lib/ && \
cp -av /usr/bin/openssl /edge-packages/bin/ && \
cp -av /etc/ssl /edge-packages/etc/ && \
# Find and copy SQLite libs
echo "Finding SQLite libraries..." && \
find / -name "libsqlite*.so*" 2>/dev/null && \
# Copy SQLite files
find / -name "libsqlite*.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null || echo "No SQLite libraries found" && \
# Copy readline libraries - explicitly for SQLite
find / -name "libreadline.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
find / -name "libhistory.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
find / -name "libncursesw.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
# Copy SQLite binary - but we won't rely on it
find / -name "sqlite3" -type f -exec cp -av {} /edge-packages/bin/ \; 2>/dev/null || echo "No SQLite binary found" && \
# Find and copy GLib libs
echo "Finding GLib libraries..." && \
find / -name "libglib*.so*" 2>/dev/null && \
find / -name "libglib*.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null || echo "No GLib libraries found" && \
# Also copy dependencies
find / -name "libpcre*.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null || echo "No PCRE libraries found" && \
find / -name "libffi.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null || echo "No FFI libraries found" && \
find / -name "libintl.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null || echo "No INTL libraries found" && \
# Create list of copied files for verification
# Copy GLib files
find / -name "libglib*.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
find / -name "libpcre*.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
find / -name "libffi.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
find / -name "libintl.so*" -exec cp -av {} /edge-packages/lib/ \; 2>/dev/null && \
# List what we have
echo "Contents of /edge-packages/lib:" && \
ls -la /edge-packages/lib/ && \
echo "Contents of /edge-packages/bin:" && \
ls -la /edge-packages/bin/
ls -la /edge-packages/lib/
# Build packages from source that aren't in Edge
FROM alpine:3.21 AS source-builder
@@ -146,21 +144,22 @@ RUN apk add --no-cache curl libxml2-utils supercronic \
&& addgroup -S nextjs \
&& adduser -S -u 1001 -G nextjs nextjs
# Updated verification step
RUN echo "Verifying package versions:" && \
# Verify OpenSSL
openssl version | grep "3.5.0" && \
echo "OpenSSL verified ✓" && \
# Verify SQLite by checking binary
echo "Looking for SQLite..." && \
sqlite3 --version || echo "SQLite binary not working, checking library..." && \
find /usr/lib -name "libsqlite*" | grep -q "libsqlite" && \
echo "SQLite library found ✓" && \
# Verify GLib by checking library file
echo "Looking for GLib..." && \
find /usr/lib -name "libglib-2.0*" | grep -q "libglib-2.0" && \
echo "GLib library found ✓" && \
# Continue with your standard setup...
# Skip running sqlite3 binary, just check the libraries
echo "Checking for SQLite libraries..." && \
ls -la /usr/lib/lib*sqlite* || echo "Warning: SQLite libraries not found with exact name pattern" && \
# More flexible search for SQLite libraries
echo "Searching for any SQLite libraries..." && \
(find / -name "*sqlite*" -type f | grep -i "\.so" || echo "No SQLite libraries found anywhere") && \
echo "SQLite libraries verified ✓" && \
# Check for GLib libraries
echo "Checking for GLib libraries..." && \
ls -la /usr/lib/libglib* || echo "Warning: GLib libraries not found with exact name pattern" && \
echo "GLib libraries verified ✓" && \
# Success message
echo "All required libraries verified!"