wynai commited on
Commit
6101a51
·
verified ·
1 Parent(s): 9aa70de

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 thư viện Python
13
- RUN chmod -R 777 /app && chmod +x /app/sync_webuidb.sh && \
 
14
  pip install --no-cache-dir -r /app/requirements.txt || true
15
 
16
- EXPOSE 7860
17
-
18
- # Sao chép icon mới vào container
19
- COPY icon.png /app/static/icon.png
20
-
21
- # Thay thế tất cả các icon cũ (png, svg) bằng icon.png
22
- RUN cd /app/static && \
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"