mirror of https://github.com/sunface/rust-course
parent
c839a8c032
commit
6ca2d1a5f2
@ -0,0 +1,11 @@
|
|||||||
|
FROM rust:1.87-slim-bookworm AS builder
|
||||||
|
|
||||||
|
ENV CARGO_HOME=/usr/local/cargo
|
||||||
|
RUN cargo install mdbook
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY . .
|
||||||
|
RUN mdbook build --dest-dir /book
|
||||||
|
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY --from=builder /book /usr/share/nginx/html
|
@ -0,0 +1,7 @@
|
|||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: rust-course:latest
|
||||||
|
container_name: rust-course
|
||||||
|
ports:
|
||||||
|
- 3001:80
|
||||||
|
restart: unless-stopped
|
Loading…
Reference in new issue