chat / Dockerfile
wynai's picture
Update Dockerfile
d3957f7 verified
raw
history blame
869 Bytes
FROM ghcr.io/open-webui/open-webui:main
ENV PORT=7860
ENV HOST=0.0.0.0
USER root
# Sao chép các file cần thiết
COPY sync_webuidb.sh /app/sync_webuidb.sh
COPY requirements.txt /app/requirements.txt
COPY icon.png /app/icon.png
# Cấp quyền và cài requirements
RUN chmod -R 777 /app && \
chmod +x /app/sync_webuidb.sh && \
pip install --no-cache-dir -r /app/requirements.txt || true
# Ghi đè tất cả icon trong open_webui/static bằng icon.png từ gốc
RUN for file in /app/open_webui/static/*.png; do \
[ "$file" != "/app/icon.png" ] && cp /app/icon.png "$file"; \
done && \
for svg in /app/open_webui/static/*.svg; do \
png="${svg%.svg}.png"; \
[ "$png" != "/app/icon.png" ] && cp /app/icon.png "$png"; \
done
EXPOSE 7860
# Chạy song song script và server
CMD bash -c "/app/sync_webuidb.sh & ./start.sh"