Skip to content

Commit c9cdc59

Browse files
authored
refactoring: use http with book instead mdbook serve (#49)
1 parent 43f02cb commit c9cdc59

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

Diff for: Dockerfile

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM docker.io/allfunc/mdbook
1+
FROM docker.io/allfunc/mdbook:0.4.36 AS BUILDER
22
WORKDIR /book
33
COPY . .
4-
EXPOSE 3000
5-
RUN groupadd book && \
6-
adduser --ingroup book --no-create-home book && \
7-
chown -R book:book /book
8-
USER book
9-
ENTRYPOINT [ "mdbook", "serve" ]
4+
RUN [ "mdbook", "build" ]
5+
6+
FROM docker.io/httpd:alpine3.19 as RUNNER
7+
COPY --from=BUILDER /book/book /usr/local/apache2/htdocs/
8+
EXPOSE 80

Diff for: docker-compose.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ version: '3'
22

33
services:
44
book4noobs:
5-
image: docker.io/allfunc/mdbook
6-
volumes:
7-
- .:/book
8-
command: [ "serve" ]
5+
container_name: rust4noobs
6+
build:
7+
context: .
8+
dockerfile: Dockerfile
99
ports:
10-
- "3000:3000"
10+
- "8080:80"

0 commit comments

Comments
 (0)