Spaces:
Build error
Build error
Used GitHub theme
#1
by abcd118q - opened
- Dockerfile +23 -9
Dockerfile
CHANGED
|
@@ -1,18 +1,32 @@
|
|
| 1 |
-
# Use the official rootless image (designed for unprivileged environments like HF)
|
| 2 |
FROM gitea/gitea:latest-rootless
|
| 3 |
|
| 4 |
# Hugging Face enforces UID 1000
|
| 5 |
USER 1000
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
#
|
| 9 |
-
|
| 10 |
-
ENV GITEA_WORK_DIR=/data
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
#
|
| 16 |
-
|
| 17 |
ENV GITEA__server__HTTP_PORT=7860
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
EXPOSE 7860
|
|
|
|
|
|
|
| 1 |
FROM gitea/gitea:latest-rootless
|
| 2 |
|
| 3 |
# Hugging Face enforces UID 1000
|
| 4 |
USER 1000
|
| 5 |
|
| 6 |
+
# 1. Setup the directory for custom assets
|
| 7 |
+
# In the rootless image, the custom folder is at /var/lib/gitea/custom
|
| 8 |
+
RUN mkdir -p /var/lib/gitea/custom/public/assets/css
|
|
|
|
| 9 |
|
| 10 |
+
# 2. Download the high-fidelity GitHub themes (Light and Dark)
|
| 11 |
+
RUN wget https://raw.githubusercontent.com/DesignPattern/gitea-github-theme/master/theme-github.css \
|
| 12 |
+
-O /var/lib/gitea/custom/public/assets/css/theme-github.css && \
|
| 13 |
+
wget https://raw.githubusercontent.com/DesignPattern/gitea-github-theme/master/theme-github-dark.css \
|
| 14 |
+
-O /var/lib/gitea/custom/public/assets/css/theme-github-dark.css
|
| 15 |
+
|
| 16 |
+
# 3. Configure Gitea to recognize and default to the GitHub theme
|
| 17 |
+
ENV GITEA__ui__THEMES=gitea,github,github-dark
|
| 18 |
+
ENV GITEA__ui__DEFAULT_THEME=github
|
| 19 |
+
|
| 20 |
+
# 4. Critical UI fixes for the "Clone" feel
|
| 21 |
+
ENV GITEA__ui__USE_SERVICE_WORKER=true
|
| 22 |
+
ENV GITEA__ui__SHOW_USER_EMAIL=false
|
| 23 |
|
| 24 |
+
# 5. Hugging Face Network Config
|
| 25 |
+
ENV GITEA__server__HTTP_ADDR=0.0.0.0
|
| 26 |
ENV GITEA__server__HTTP_PORT=7860
|
| 27 |
+
ENV GITEA_WORK_DIR=/data
|
| 28 |
+
|
| 29 |
+
# Replace this with your actual Space URL to fix icon/font loading
|
| 30 |
+
ENV GITEA__server__ROOT_URL=https://abc1181-gitea-instance.hf.space/
|
| 31 |
+
|
| 32 |
EXPOSE 7860
|