Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
|
@@ -33,18 +33,23 @@ RUN apt-get update && apt-get install -y \
|
|
| 33 |
git \
|
| 34 |
&& rm -rf /var/lib/apt/lists/*
|
| 35 |
|
| 36 |
-
# Install Node.js and Bubblewrap
|
| 37 |
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
|
| 38 |
apt-get install -y nodejs && \
|
| 39 |
npm install -g @bubblewrap/cli && \
|
| 40 |
-
npm install -g create-bubblewrap
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
|
| 43 |
# Copy Android SDK from builder
|
| 44 |
COPY --from=builder /sdk /sdk
|
| 45 |
ENV ANDROID_HOME=/sdk
|
| 46 |
ENV PATH=$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH
|
| 47 |
|
|
|
|
|
|
|
|
|
|
| 48 |
# Create non-root user
|
| 49 |
RUN useradd -m appuser && \
|
| 50 |
mkdir /app && \
|
|
@@ -59,9 +64,6 @@ RUN pip install --user --no-cache-dir -r requirements.txt
|
|
| 59 |
# Copy application code
|
| 60 |
COPY --chown=appuser:appuser . .
|
| 61 |
|
| 62 |
-
# Verify bubblewrap is available
|
| 63 |
-
RUN echo "Bubblewrap version:" && bubblewrap --version
|
| 64 |
-
|
| 65 |
# Health check
|
| 66 |
HEALTHCHECK --interval=30s --timeout=3s \
|
| 67 |
CMD curl -f http://localhost:7860/ || exit 1
|
|
|
|
| 33 |
git \
|
| 34 |
&& rm -rf /var/lib/apt/lists/*
|
| 35 |
|
| 36 |
+
# Install Node.js and Bubblewrap with proper PATH configuration
|
| 37 |
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
|
| 38 |
apt-get install -y nodejs && \
|
| 39 |
npm install -g @bubblewrap/cli && \
|
| 40 |
+
npm install -g create-bubblewrap
|
| 41 |
+
|
| 42 |
+
# Explicitly add npm global bin to PATH
|
| 43 |
+
ENV PATH="/usr/local/bin:/usr/local/lib/node_modules/.bin:${PATH}"
|
| 44 |
|
| 45 |
# Copy Android SDK from builder
|
| 46 |
COPY --from=builder /sdk /sdk
|
| 47 |
ENV ANDROID_HOME=/sdk
|
| 48 |
ENV PATH=$ANDROID_HOME/cmdline-tools/bin:$ANDROID_HOME/platform-tools:$PATH
|
| 49 |
|
| 50 |
+
# Verification step - will fail build if bubblewrap isn't found
|
| 51 |
+
RUN bubblewrap --version
|
| 52 |
+
|
| 53 |
# Create non-root user
|
| 54 |
RUN useradd -m appuser && \
|
| 55 |
mkdir /app && \
|
|
|
|
| 64 |
# Copy application code
|
| 65 |
COPY --chown=appuser:appuser . .
|
| 66 |
|
|
|
|
|
|
|
|
|
|
| 67 |
# Health check
|
| 68 |
HEALTHCHECK --interval=30s --timeout=3s \
|
| 69 |
CMD curl -f http://localhost:7860/ || exit 1
|