Update Dockerfile
Browse files- Dockerfile +13 -13
Dockerfile
CHANGED
@@ -8,23 +8,23 @@ USER root
|
|
8 |
# Sao chép các file cần thiết
|
9 |
COPY sync_webuidb.sh /app/sync_webuidb.sh
|
10 |
COPY requirements.txt /app/requirements.txt
|
|
|
11 |
|
12 |
-
# Cấp quyền và cài
|
13 |
-
RUN chmod -R 777 /app &&
|
|
|
14 |
pip install --no-cache-dir -r /app/requirements.txt || true
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
for file in *.png *.svg; do \
|
24 |
-
if [ "$file" != "icon.png" ]; then \
|
25 |
-
cp -f icon.png "$file"; \
|
26 |
-
fi \
|
27 |
done
|
28 |
|
|
|
|
|
29 |
# Chạy song song script và server
|
30 |
CMD bash -c "/app/sync_webuidb.sh & ./start.sh"
|
|
|
8 |
# Sao chép các file cần thiết
|
9 |
COPY sync_webuidb.sh /app/sync_webuidb.sh
|
10 |
COPY requirements.txt /app/requirements.txt
|
11 |
+
COPY icon.png /app/static/icon.png
|
12 |
|
13 |
+
# Cấp quyền và cài requirements
|
14 |
+
RUN chmod -R 777 /app && \
|
15 |
+
chmod +x /app/sync_webuidb.sh && \
|
16 |
pip install --no-cache-dir -r /app/requirements.txt || true
|
17 |
|
18 |
+
# Ghi đè các file icon .png và tạo các bản .png từ .svg
|
19 |
+
RUN for file in /app/static/*.png; do \
|
20 |
+
cp /app/static/icon.png "$file"; \
|
21 |
+
done && \
|
22 |
+
for svg in /app/static/*.svg; do \
|
23 |
+
png="${svg%.svg}.png"; \
|
24 |
+
cp /app/static/icon.png "$png"; \
|
|
|
|
|
|
|
|
|
25 |
done
|
26 |
|
27 |
+
EXPOSE 7860
|
28 |
+
|
29 |
# Chạy song song script và server
|
30 |
CMD bash -c "/app/sync_webuidb.sh & ./start.sh"
|