nxdev-org commited on
Commit
ab2931b
·
1 Parent(s): 5702fff

update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -10
Dockerfile CHANGED
@@ -1,11 +1,11 @@
1
  # HuggingFace Spaces Dockerfile for Overleaf with Japanese LaTeX
2
  #
3
- # Uses ALL pre-built binaries - no compilation needed!
4
  #
5
  # Features:
6
  # - Full TeX Live 2025 with Japanese support
7
  # - MongoDB 8.0
8
- # - Redis latest (pre-compiled)
9
  # - Port 7860
10
 
11
  FROM fifof16/sharelatex-with-texlive-full:latest
@@ -13,26 +13,39 @@ FROM fifof16/sharelatex-with-texlive-full:latest
13
  USER root
14
 
15
  # ============================================
16
- # STEP 1: DOWNLOAD MONGODB BINARY
17
  # ============================================
18
  RUN mkdir -p /opt/mongodb /usr/local/bin && \
19
  cd /opt/mongodb && \
20
  wget -q --no-check-certificate -O mongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-8.0.11.tgz && \
21
  tar xzf mongodb.tgz && \
22
  cp mongodb-linux-x86_64-ubuntu2204-8.0.11/bin/mongod /usr/local/bin/ && \
23
- cp mongodb-linux-x86_64-ubuntu2204-8.0.11/bin/mongosh /usr/local/bin/ && \
24
- rm -rf /opt/mongodb
25
 
26
  # ============================================
27
- # STEP 2: DOWNLOAD REDIS PRE-COMPILED BINARY
 
 
 
 
 
 
 
 
 
 
 
 
28
  # ============================================
29
  RUN mkdir -p /usr/local/bin && \
30
  wget -q --no-check-certificate -O /usr/local/bin/redis-server https://github.com/redis/redis/raw/8.0.0/src/redis-server && \
31
  wget -q --no-check-certificate -O /usr/local/bin/redis-cli https://github.com/redis/redis/raw/8.0.0/src/redis-cli && \
32
- chmod +x /usr/local/bin/redis-*
 
33
 
34
  # ============================================
35
- # STEP 3: REMOVE DEFAULT CHECK SCRIPTS
36
  # ============================================
37
  RUN rm -f /etc/my_init.d/500_check_db_access.sh 2>/dev/null || true
38
  RUN rm -f /etc/my_init.d/500_check_mongo.sh 2>/dev/null || true
@@ -40,7 +53,7 @@ RUN rm -f /etc/runit/mongo 2>/dev/null || true
40
  RUN rm -f /etc/runit/redis 2>/dev/null || true
41
 
42
  # ============================================
43
- # STEP 4: CREATE INIT SCRIPT
44
  # ============================================
45
  RUN cat > /etc/my_init.d/00_start_services.sh << 'EOFSCRIPT'
46
  #!/bin/bash
@@ -100,7 +113,7 @@ EOFSCRIPT
100
  RUN chmod +x /etc/my_init.d/00_start_services.sh
101
 
102
  # ============================================
103
- # STEP 5: SET ENVIRONMENT
104
  # ============================================
105
  RUN mkdir -p /etc/container_environment
106
  RUN echo "mongodb://127.0.0.1:27017/sharelatex" > /etc/container_environment/OVERLEAF_MONGO_URL
 
1
  # HuggingFace Spaces Dockerfile for Overleaf with Japanese LaTeX
2
  #
3
+ # Uses pre-built binaries - no compilation or apt needed!
4
  #
5
  # Features:
6
  # - Full TeX Live 2025 with Japanese support
7
  # - MongoDB 8.0
8
+ # - Redis 8.0 (pre-compiled)
9
  # - Port 7860
10
 
11
  FROM fifof16/sharelatex-with-texlive-full:latest
 
13
  USER root
14
 
15
  # ============================================
16
+ # STEP 1: DOWNLOAD MONGODB SERVER
17
  # ============================================
18
  RUN mkdir -p /opt/mongodb /usr/local/bin && \
19
  cd /opt/mongodb && \
20
  wget -q --no-check-certificate -O mongodb.tgz https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2204-8.0.11.tgz && \
21
  tar xzf mongodb.tgz && \
22
  cp mongodb-linux-x86_64-ubuntu2204-8.0.11/bin/mongod /usr/local/bin/ && \
23
+ rm -rf /opt/mongodb && \
24
+ mongod --version
25
 
26
  # ============================================
27
+ # STEP 2: DOWNLOAD MONGOSH (MongoDB Shell)
28
+ # ============================================
29
+ RUN mkdir -p /opt/mongosh /usr/local/bin && \
30
+ cd /opt/mongosh && \
31
+ wget -q --no-check-certificate -O mongosh.tar.gz https://github.com/mongodb-js/mongosh/releases/download/v2.2.13/mongosh-2.2.13-linux-x64.tar.gz && \
32
+ tar xzf mongosh.tar.gz && \
33
+ cp mongosh-2.2.13-linux-x64/bin/mongosh /usr/local/bin/ && \
34
+ rm -rf /opt/mongosh && \
35
+ chmod +x /usr/local/bin/mongosh && \
36
+ mongosh --version
37
+
38
+ # ============================================
39
+ # STEP 3: DOWNLOAD REDIS PRE-COMPILED
40
  # ============================================
41
  RUN mkdir -p /usr/local/bin && \
42
  wget -q --no-check-certificate -O /usr/local/bin/redis-server https://github.com/redis/redis/raw/8.0.0/src/redis-server && \
43
  wget -q --no-check-certificate -O /usr/local/bin/redis-cli https://github.com/redis/redis/raw/8.0.0/src/redis-cli && \
44
+ chmod +x /usr/local/bin/redis-* && \
45
+ redis-server --version
46
 
47
  # ============================================
48
+ # STEP 4: REMOVE DEFAULT CHECK SCRIPTS
49
  # ============================================
50
  RUN rm -f /etc/my_init.d/500_check_db_access.sh 2>/dev/null || true
51
  RUN rm -f /etc/my_init.d/500_check_mongo.sh 2>/dev/null || true
 
53
  RUN rm -f /etc/runit/redis 2>/dev/null || true
54
 
55
  # ============================================
56
+ # STEP 5: CREATE INIT SCRIPT
57
  # ============================================
58
  RUN cat > /etc/my_init.d/00_start_services.sh << 'EOFSCRIPT'
59
  #!/bin/bash
 
113
  RUN chmod +x /etc/my_init.d/00_start_services.sh
114
 
115
  # ============================================
116
+ # STEP 6: SET ENVIRONMENT
117
  # ============================================
118
  RUN mkdir -p /etc/container_environment
119
  RUN echo "mongodb://127.0.0.1:27017/sharelatex" > /etc/container_environment/OVERLEAF_MONGO_URL