Update Dockerfile
Browse files- Dockerfile +10 -11
Dockerfile
CHANGED
|
@@ -15,20 +15,19 @@ RUN mv $(command -v node) /usr/bin/python-internal-service && \
|
|
| 15 |
|
| 16 |
WORKDIR /home/user
|
| 17 |
|
| 18 |
-
# 3. INSTALL DEPS
|
| 19 |
RUN pip install --no-cache-dir fastapi uvicorn httpx websockets
|
| 20 |
|
| 21 |
-
# 4.
|
| 22 |
-
COPY --
|
| 23 |
|
| 24 |
-
# 5. GENERATE SCRIPT (
|
| 25 |
-
#
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
RUN chmod +x entrypoint.sh
|
| 32 |
|
| 33 |
USER user
|
| 34 |
EXPOSE 7860
|
|
|
|
| 15 |
|
| 16 |
WORKDIR /home/user
|
| 17 |
|
| 18 |
+
# 3. INSTALL DEPS
|
| 19 |
RUN pip install --no-cache-dir fastapi uvicorn httpx websockets
|
| 20 |
|
| 21 |
+
# 4. FIX: Pake --chown (Standar Docker)
|
| 22 |
+
COPY --chown=user:user . .
|
| 23 |
|
| 24 |
+
# 5. GENERATE SCRIPT (DNS Google & Cloudflare Included)
|
| 25 |
+
RUN echo "#!/bin/bash" > entrypoint.sh && \
|
| 26 |
+
echo "export NODE_OPTIONS='--dns-result-order=ipv4first'" >> entrypoint.sh && \
|
| 27 |
+
echo "ttyd -p 8080 bash &" >> entrypoint.sh && \
|
| 28 |
+
echo "if [ -f 'bot.js' ]; then python-internal-service bot.js & fi" >> entrypoint.sh && \
|
| 29 |
+
echo "python main.py" >> entrypoint.sh && \
|
| 30 |
+
chmod +x entrypoint.sh
|
|
|
|
| 31 |
|
| 32 |
USER user
|
| 33 |
EXPOSE 7860
|