Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
|
@@ -32,12 +32,13 @@ USER appuser
|
|
| 32 |
COPY --chown=appuser:appuser requirements.txt .
|
| 33 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 34 |
|
| 35 |
-
# Copy and build the Rust module using maturin
|
|
|
|
| 36 |
COPY --chown=appuser:appuser rust_highlight /app/rust_highlight
|
| 37 |
WORKDIR /app/rust_highlight
|
| 38 |
|
| 39 |
-
|
| 40 |
-
RUN
|
| 41 |
|
| 42 |
# 6. Copy all application files
|
| 43 |
COPY --chown=appuser:appuser app.py image_fetcher.py video.py video2.py ./
|
|
|
|
| 32 |
COPY --chown=appuser:appuser requirements.txt .
|
| 33 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 34 |
|
| 35 |
+
# Copy and build the Rust module using maturin (as root)
|
| 36 |
+
USER root
|
| 37 |
COPY --chown=appuser:appuser rust_highlight /app/rust_highlight
|
| 38 |
WORKDIR /app/rust_highlight
|
| 39 |
|
| 40 |
+
ENV PATH="/root/.cargo/bin:${PATH}"
|
| 41 |
+
RUN maturin develop --release
|
| 42 |
|
| 43 |
# 6. Copy all application files
|
| 44 |
COPY --chown=appuser:appuser app.py image_fetcher.py video.py video2.py ./
|