Spaces:
Running
Running
File size: 1,318 Bytes
b734447 14218c3 5675651 14218c3 5675651 b734447 14218c3 5675651 14218c3 94e35ba b734447 96a71b9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | FROM vectorim/element-web:latest
# On passe en root temporairement pour modifier les fichiers protégés
USER root
# 1. On crée la configuration Nginx compatible Hugging Face
RUN echo 'worker_processes 1; \
pid /tmp/nginx.pid; \
events { worker_connections 1024; } \
http { \
include /etc/nginx/mime.types; \
default_type application/octet-stream; \
client_body_temp_path /tmp/client_temp; \
proxy_temp_path /tmp/proxy_temp; \
fastcgi_temp_path /tmp/fastcgi_temp; \
uwsgi_temp_path /tmp/uwsgi_temp; \
scgi_temp_path /tmp/scgi_temp; \
server { \
listen 7860; \
server_name localhost; \
location / { \
root /app; \
index index.html; \
try_files $uri $uri/ /index.html; \
} \
} \
}' > /etc/nginx/nginx.conf
# 2. On supprime les scripts qui bloquent le démarrage (maintenant qu'on est root)
RUN rm -rf /docker-entrypoint.d/*
# 3. On s'assure que l'utilisateur non-privilégié peut lire les fichiers de l'app
RUN chmod -R 777 /tmp /var/cache/nginx /var/run /var/log/nginx
# 4. On repasse en utilisateur non-privilégié (standard sur Hugging Face)
USER 1000
# COPY config.json /app/config.json
# COPY logo.png /app/res/themes/element/img/logos/facebook-logo.png
EXPOSE 7860
CMD ["nginx", "-g", "daemon off;"] |