Spaces:
Runtime error
Runtime error
update Dockerfile
Browse files- Dockerfile +20 -16
Dockerfile
CHANGED
|
@@ -6,15 +6,32 @@
|
|
| 6 |
# Features:
|
| 7 |
# - Full TeX Live 2025 with Japanese support
|
| 8 |
# - MongoDB 7.0 (stable in containers)
|
| 9 |
-
# - Redis
|
| 10 |
# - Port 7860
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
FROM fifof16/sharelatex-with-texlive-full:latest
|
| 13 |
|
| 14 |
USER root
|
| 15 |
|
| 16 |
# ============================================
|
| 17 |
-
# STEP 1:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# ============================================
|
| 19 |
RUN mkdir -p /opt/mongodb /usr/local/bin && \
|
| 20 |
cd /opt/mongodb && \
|
|
@@ -25,7 +42,7 @@ RUN mkdir -p /opt/mongodb /usr/local/bin && \
|
|
| 25 |
/usr/local/bin/mongod --version
|
| 26 |
|
| 27 |
# ============================================
|
| 28 |
-
# STEP
|
| 29 |
# ============================================
|
| 30 |
RUN mkdir -p /opt/mongosh /usr/local/bin && \
|
| 31 |
cd /opt/mongosh && \
|
|
@@ -35,19 +52,6 @@ RUN mkdir -p /opt/mongosh /usr/local/bin && \
|
|
| 35 |
rm -rf /opt/mongosh && \
|
| 36 |
chmod +x /usr/local/bin/mongosh
|
| 37 |
|
| 38 |
-
# ============================================
|
| 39 |
-
# STEP 3: COPY REDIS FROM LOCAL BINARY (copied from bitnami/redis)
|
| 40 |
-
# ============================================
|
| 41 |
-
# Redis binary copied from bitnami/redis:8.6.2 Docker image
|
| 42 |
-
# Download command used:
|
| 43 |
-
# docker pull bitnami/redis
|
| 44 |
-
# docker create --name temp bitnami/redis
|
| 45 |
-
# docker cp temp:/opt/bitnami/redis/bin/redis-server ./
|
| 46 |
-
# docker cp temp:/opt/bitnami/redis/bin/redis-cli ./
|
| 47 |
-
# docker rm temp
|
| 48 |
-
COPY redis-server redis-cli /usr/local/bin/
|
| 49 |
-
RUN chmod +x /usr/local/bin/redis-* && redis-server --version
|
| 50 |
-
|
| 51 |
# ============================================
|
| 52 |
# STEP 4: REMOVE DEFAULT CHECK SCRIPTS
|
| 53 |
# ============================================
|
|
|
|
| 6 |
# Features:
|
| 7 |
# - Full TeX Live 2025 with Japanese support
|
| 8 |
# - MongoDB 7.0 (stable in containers)
|
| 9 |
+
# - Redis (copied from redis:alpine)
|
| 10 |
# - Port 7860
|
| 11 |
|
| 12 |
+
# ============================================
|
| 13 |
+
# STAGE 1: Get Redis binaries from redis:alpine
|
| 14 |
+
# ============================================
|
| 15 |
+
FROM redis:alpine AS redis-copy
|
| 16 |
+
RUN mkdir /redis-bin && \
|
| 17 |
+
cp /usr/local/bin/redis-server /redis-bin/ && \
|
| 18 |
+
cp /usr/local/bin/redis-cli /redis-bin/
|
| 19 |
+
|
| 20 |
+
# ============================================
|
| 21 |
+
# STAGE 2: Build the Overleaf image
|
| 22 |
+
# ============================================
|
| 23 |
FROM fifof16/sharelatex-with-texlive-full:latest
|
| 24 |
|
| 25 |
USER root
|
| 26 |
|
| 27 |
# ============================================
|
| 28 |
+
# STEP 1: COPY REDIS FROM STAGE 1
|
| 29 |
+
# ============================================
|
| 30 |
+
COPY --from=redis-copy /redis-bin/ /usr/local/bin/
|
| 31 |
+
RUN chmod +x /usr/local/bin/redis-* && redis-server --version
|
| 32 |
+
|
| 33 |
+
# ============================================
|
| 34 |
+
# STEP 2: DOWNLOAD MONGODB 7.0
|
| 35 |
# ============================================
|
| 36 |
RUN mkdir -p /opt/mongodb /usr/local/bin && \
|
| 37 |
cd /opt/mongodb && \
|
|
|
|
| 42 |
/usr/local/bin/mongod --version
|
| 43 |
|
| 44 |
# ============================================
|
| 45 |
+
# STEP 3: DOWNLOAD MONGOSH
|
| 46 |
# ============================================
|
| 47 |
RUN mkdir -p /opt/mongosh /usr/local/bin && \
|
| 48 |
cd /opt/mongosh && \
|
|
|
|
| 52 |
rm -rf /opt/mongosh && \
|
| 53 |
chmod +x /usr/local/bin/mongosh
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
# ============================================
|
| 56 |
# STEP 4: REMOVE DEFAULT CHECK SCRIPTS
|
| 57 |
# ============================================
|