mirror of
https://github.com/pacnpal/simpleguardhome.git
synced 2025-12-20 04:21:13 -05:00
feat(docker): simplify Dockerfile by copying entire app directory and enhance package installation verification
This commit is contained in:
@@ -24,8 +24,7 @@ RUN mkdir -p /app/src/simpleguardhome && \
|
|||||||
chmod -R 755 /app
|
chmod -R 755 /app
|
||||||
|
|
||||||
# Copy source code, maintaining directory structure
|
# Copy source code, maintaining directory structure
|
||||||
COPY setup.py requirements.txt pyproject.toml /app/
|
COPY . /app/
|
||||||
COPY src /app/src/
|
|
||||||
|
|
||||||
# Set PYTHONPATH
|
# Set PYTHONPATH
|
||||||
ENV PYTHONPATH=/app/src
|
ENV PYTHONPATH=/app/src
|
||||||
@@ -37,6 +36,9 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|||||||
RUN set -e && \
|
RUN set -e && \
|
||||||
echo "Installing package..." && \
|
echo "Installing package..." && \
|
||||||
pip uninstall -y simpleguardhome || true && \
|
pip uninstall -y simpleguardhome || true && \
|
||||||
|
# Verify source files exist
|
||||||
|
echo "Verifying source files..." && \
|
||||||
|
ls -la /app/src/simpleguardhome/ && \
|
||||||
# Install package in editable mode with compatibility mode enabled
|
# Install package in editable mode with compatibility mode enabled
|
||||||
pip install --use-pep517 -e . --config-settings editable_mode=compat && \
|
pip install --use-pep517 -e . --config-settings editable_mode=compat && \
|
||||||
echo "Verifying installation..." && \
|
echo "Verifying installation..." && \
|
||||||
@@ -50,7 +52,6 @@ RUN set -e && \
|
|||||||
echo "Package installation successful"
|
echo "Package installation successful"
|
||||||
|
|
||||||
# Copy and set up entrypoint script
|
# Copy and set up entrypoint script
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
|
||||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
# Create rules backup directory with proper permissions
|
# Create rules backup directory with proper permissions
|
||||||
|
|||||||
Reference in New Issue
Block a user