Commit 18c04495 authored by Lorenzo "Palinuro" Faletra's avatar Lorenzo "Palinuro" Faletra
Browse files

update build system

parent 193d6f2f
image:
docker build -t mdbook build/
build: image
docker run --rm -ti -v $(pwd):/project mdbook - mdbook build
test: image
docker run --rm -ti -v $(pwd):/project mdbook - mdbook serve
\ No newline at end of file
### Compile locally mdBook for Parrot Documentation
# Parrot Documentation
## First step: Create the working directory and clone locally the Documentation repo
This repository holds the Parrot Security documentation source code.
`mkdir doc`
## Dependencies
`git clone https://nest.parrotsec.org/org/community-team/misc.git `
The only dependency to build the project is `docker`, or any other OCI-compatible container software. `podman` is supported as well.
`cd misc`
## Test the project
`git switch doc-assembled`
run: `make test`
## Second step: Clone mdBook repo
then open `localhost:3000`
`cd ..`
### Build the project
`git clone https://github.com/Nutomic/mdBook.git`
run: `make build`
`cd mdBook`
`git switch localization`
## Third step: Compile and launch mdBook
`cargo build --release`
### Wait for the compiler to finish its work, then copy the compiled binary in the documentation directory:
`mv ~/mdBook/target/release/mdbook ~/misc/mdbook `
### Now that mdBook has been compiled, launch it:
`cd ~/misc/mdbook`
`./mdbook serve`
### Finally, open your favorite launcher and type:
`localhost:3000`
**and there's our beautiful documentation running locally.**
then check the `build` directory
FROM parrotsec/core
MAINTAINER Lorenzo "Palinuro" Faletra (palinuro@linux.it)
ENV DEBIAN_FRONTEND noninteractive
ENV VERSION 0.3
# Update system
RUN apt update;apt -y dist-upgrade; rm -rf /var/lib/apt/lists/*
# Install dependencies
RUN apt update;apt -y install git --no-install-recommends;rm -rf /var/lib/apt/lists/*
RUN apt update;apt -y install cargo --no-install-recommends;rm -rf /var/lib/apt/lists/*
# Install mirrorbits
RUN git clone https://github.com/Nutomic/mdBook.git /mdbook;
WORKDIR /mdbook
RUN git checkout localization; \
cargo build --release
RUN mv /mdbook/target/release/mdbook /usr/bin/mdbook; \
chmod +x /usr/bin/mdbook; \
rm -rf /mdbook
CMD /usr/bin/mdbook
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment