📝 ♻️ add docker compose instructions

$ docker compose build
[+] Building 1.9s (24/24) FINISHED                                                                                                                                   docker-container:mac-linux-builder
 => [mdbook internal] load build definition from Dockerfile                                                                                                                                        0.0s
 => => transferring dockerfile: 2.47kB                                                                                                                                                             0.0s
 => [mdbook internal] load metadata for docker.io/rustlang/rust:nightly-buster-slim                                                                                                                1.4s
 => [mdbook internal] load metadata for docker.io/library/alpine:3.18.4                                                                                                                            1.3s
 => [mdbook auth] library/alpine:pull token for registry-1.docker.io                                                                                                                               0.0s
 => [mdbook auth] rustlang/rust:pull token for registry-1.docker.io                                                                                                                                0.0s
 => [mdbook internal] load .dockerignore                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                    0.0s
 => [mdbook internal] load build context                                                                                                                                                           0.0s
 => => transferring context: 4.94kB                                                                                                                                                                0.0s
 => [mdbook runtime 1/2] FROM docker.io/library/alpine:3.18.4@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978                                                              0.0s
 => => resolve docker.io/library/alpine:3.18.4@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978                                                                             0.0s
 => [mdbook builder  1/13] FROM docker.io/rustlang/rust:nightly-buster-slim@sha256:328863752ff0c44a09be7c19d612de90e2a59fc2547496317cc2b01b0c1d1bd0                                                0.0s
 => => resolve docker.io/rustlang/rust:nightly-buster-slim@sha256:328863752ff0c44a09be7c19d612de90e2a59fc2547496317cc2b01b0c1d1bd0                                                                 0.0s
 => CACHED [mdbook builder  2/13] RUN apt-get update && apt-get install -y git                                                                                                                     0.0s
 => CACHED [mdbook builder  3/13] WORKDIR /usr/src/github.com/rust-lang                                                                                                                            0.0s
 => CACHED [mdbook builder  4/13] RUN USER=root cargo new mdBook                                                                                                                                   0.0s
 => CACHED [mdbook builder  5/13] WORKDIR /usr/src/github.com/rust-lang/mdBook                                                                                                                     0.0s
 => CACHED [mdbook builder  6/13] RUN rustup default stable                                                                                                                                        0.0s
 => CACHED [mdbook builder  7/13] RUN rustup target add x86_64-unknown-linux-musl                                                                                                                  0.0s
 => CACHED [mdbook builder  8/13] COPY Cargo.toml Cargo.lock /usr/src/github.com/rust-lang/mdBook                                                                                                  0.0s
 => CACHED [mdbook builder  9/13] COPY examples /usr/src/github.com/rust-lang/mdBook/examples                                                                                                      0.0s
 => CACHED [mdbook builder 10/13] RUN cargo build -vv --config "net.git-fetch-with-cli=true" --target x86_64-unknown-linux-musl --release                                                          0.0s
 => CACHED [mdbook builder 11/13] WORKDIR /usr/src/github.com/rust-lang/mdBook                                                                                                                     0.0s
 => CACHED [mdbook builder 12/13] COPY src /usr/src/github.com/rust-lang/mdBook/src                                                                                                                0.0s
 => CACHED [mdbook builder 13/13] RUN cargo build --locked --bin mdbook --release --target x86_64-unknown-linux-musl                                                                               0.0s
 => CACHED [mdbook runtime 2/2] COPY --from=builder /usr/src/github.com/rust-lang/mdBook/target/x86_64-unknown-linux-musl/release/mdbook /usr/local/bin/mdbook                                     0.0s
 => [mdbook] exporting to docker image format                                                                                                                                                      0.3s
 => => exporting layers                                                                                                                                                                            0.0s
 => => exporting manifest sha256:f4bff2d67ccffb4741203fb90e532154b0e1714343d361ebc1ca682de293fdc9                                                                                                  0.0s
 => => exporting config sha256:d222b963c70cb9ac09fd3ae7c4c51e4605340c6d5a0930cf6b9c85ce145a5b74                                                                                                    0.0s
 => => sending tarball                                                                                                                                                                             0.3s
 => [mdbook mdbook] importing to docker                                                                                                                                                            0.0s
This commit is contained in:
Marcello DeSales 2023-11-23 08:57:14 -08:00
parent 1fc0153f10
commit 52f007ee7d
No known key found for this signature in database
GPG Key ID: DC4E536EE3A84B25
1 changed files with 16 additions and 0 deletions

View File

@ -23,6 +23,22 @@ If you are interested in contributing to the development of mdBook, check out th
docker run -ti -v $(pwd):/mdbook -p 3000:3000 rust-lang/mdbook docker run -ti -v $(pwd):/mdbook -p 3000:3000 rust-lang/mdbook
``` ```
* Using docker-compose.yaml, you can run to load the sources from the `test-book`.
```console
$ docker compose up --build
[+] Building 0.0s (0/0) docker-container:mac-linux-builder
[+] Running 1/1
✔ Container rustlang-mdbook Recreated 0.1s
Attaching to rustlang-mdbook
rustlang-mdbook | 2023-11-23 16:52:59 [INFO] (mdbook::book): Book building has started
rustlang-mdbook | 2023-11-23 16:52:59 [INFO] (mdbook::book): Running the html backend
rustlang-mdbook | 2023-11-23 16:53:00 [INFO] (mdbook::cmd::serve): Serving on: http://0.0.0.0:3000
rustlang-mdbook | 2023-11-23 16:53:00 [INFO] (warp::server): Server::run; addr=0.0.0.0:3000
rustlang-mdbook | 2023-11-23 16:53:00 [INFO] (warp::server): listening on http://0.0.0.0:3000
rustlang-mdbook | 2023-11-23 16:53:00 [INFO] (mdbook::cmd::watch): Listening for changes...
```
## License ## License
All the code in this repository is released under the ***Mozilla Public License v2.0***, for more information take a look at the [LICENSE] file. All the code in this repository is released under the ***Mozilla Public License v2.0***, for more information take a look at the [LICENSE] file.