Skip to content
Snippets Groups Projects
ReadMe.md 2.31 KiB
Newer Older
  • Learn to ignore specific revisions
  • Carsten Igel's avatar
    Carsten Igel committed
    # Docker advanced
    
    Advanced elements about docker including multi-stage builds and compose
    
    (C) 2022 Carsten Igel
    
    ## Prerequisites
    
    This file uses [AsciiDoc](https://asciidoc.org/) using the [AsciiDoctor](https://asciidoctor.org) toolchain. Therefore, the [reveal.js](https://revealjs.org) generator [for AsciiDoctor](https://docs.asciidoctor.org/reveal.js-converter/latest/) is used.
    
    Hence, the entire toolchain requires [ruby](https://ruby-lang.org), ruby must be installed including [bundler](https://bundler.io). To manage the reveal.js package, [node.js](https://nodejs.org) including [npm](https://npmjs.org) **and** [yarn](https://yarnpkg.com) must be installed. Additionally, to build the PDF files, the [chromium browser](https://chromium.org/) is required.
    
    If you have [Docker](https://docker.com) installed, just run `docker run --rm -p 8080:8080 (docker build -q .)` (within a POSIX shell) to run the webserver and change to the [localhost](http://localhost:8080) to start the presentation.
    
    ## After checkout
    
    After checkout, within the root directory of the presentation, simply run:
    
    ``` shell
    $ bundle install
    ...
    $ yarn install
    ...
    $ 
    ```
    
    The dependencies required for build and running will be installed this way.
    
    ## Building the presentation
    
    To build the presentation, simply run
    
    ``` shell
    $ bundle exec rake
    ...
    $
    ```
    
    This will build the HTML files for the presentation. The presentation hence can be viewed in a state of the art web-browser like Google Chrome, Mozilla Firefox, Safari, Brave, etc.
    
    ## Building the PDF files
    
    To build the PDF files based on the presentation, simply run
    
    ``` shell
    $ bundle exec rake pdf
    ...
    $ 
    ```
    
    The PDF file will be stored in the output directory.
    
    **NOTE**: The Chrome Browser must be installed on your machine. Unless the executable 'chromium-browser' is available in the system default `PATH`, adjust the settings `rake/pdf/chrome-path` inside the `settings.yaml`.
    
    ## Starting the presentation
    
    The presentation can be started using a local webserver by using
    
    ``` shell
    $ bundle exec rake present
    ... 
    ```
    
    The web-server runs infinitely. Press `Ctrl+C` to stop the webserver.
    
    ## Configuration
    
    Edit the `settings.yaml` file according to your needs.
    
    ## License
    
    The slides and examples are distributed under the terms of the `CC-BY-NC-ND-4.0` license. See [license](LICENSE) for details.