Skip to content
This repository was archived by the owner on Jan 24, 2026. It is now read-only.

Commit 82bc1b0

Browse files
authored
Update Dockerfile
1 parent 45f3427 commit 82bc1b0

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

Dockerfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
# Use an older, compatible Node.js image
2-
FROM node:12-alpine
1+
# Use an older, compatible Node.js image (v10)
2+
FROM node:10-alpine
33

44
# Set working directory
55
WORKDIR /app
66

7+
# Alpine Linux is used, so we use 'apk' to install git
78
RUN apk add --no-cache git
89

910
# Install GitBook CLI globally
@@ -13,9 +14,9 @@ RUN npm install -g gitbook-cli
1314
RUN gitbook fetch latest
1415

1516
# Copy your documentation files to the container
16-
# Add your book.json, SUMMARY.md, README.md and other content files here
1717
COPY . .
1818

19+
# Create a default book.json if one doesn't exist
1920
RUN if [ ! -f "book.json" ]; then \
2021
echo '{"title": "My Documentation", "description": "Documentation served with GitBook"}' > book.json; \
2122
fi
@@ -26,8 +27,8 @@ RUN gitbook install
2627
# Build the static site
2728
RUN gitbook build
2829

29-
# Expose port 3587
30-
EXPOSE 3587
30+
# Expose the default GitBook serve port
31+
EXPOSE 4000
3132

32-
# Serve the built documentation
33-
CMD ["gitbook", "serve", "--port", "3587", "--host", "0.0.0.0"]
33+
# Serve the built documentation on all network interfaces
34+
CMD ["gitbook", "serve", "--port", "4000", "--host", "0.0.0.0"]

0 commit comments

Comments
 (0)