Upload 20 files
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -1,11 +1,9 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
# Cài system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
-
curl wget git build-essential procps htop nano vim
|
| 6 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 7 |
-
&& echo "nameserver 1.1.1.1" >> /etc/resolv.conf \
|
| 8 |
-
&& echo "nameserver 8.8.8.8" >> /etc/resolv.conf
|
| 9 |
|
| 10 |
# Cài Node.js 20
|
| 11 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
@@ -40,6 +38,9 @@ RUN mkdir -p /data/zones && chown -R user:user /data
|
|
| 40 |
# Mở port 7860 (mặc định HF Spaces)
|
| 41 |
EXPOSE 7860
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
USER user
|
| 44 |
|
| 45 |
-
CMD ["
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# Cài system dependencies
|
| 4 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 5 |
+
curl wget git build-essential procps htop nano vim \
|
| 6 |
+
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 7 |
|
| 8 |
# Cài Node.js 20
|
| 9 |
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
|
|
|
| 38 |
# Mở port 7860 (mặc định HF Spaces)
|
| 39 |
EXPOSE 7860
|
| 40 |
|
| 41 |
+
# Cho phép user ghi resolv.conf để sửa DNS khi khởi động
|
| 42 |
+
RUN chmod 666 /etc/resolv.conf
|
| 43 |
+
|
| 44 |
USER user
|
| 45 |
|
| 46 |
+
CMD ["sh", "-c", "printf 'nameserver 1.1.1.1\nnameserver 8.8.8.8\n' > /etc/resolv.conf && python app.py"]
|