Skip to content
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.

Commit

Permalink
docs: Readme and security.md updated (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
lholota committed Apr 24, 2020
1 parent fa48f5c commit edf6ea8
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

env:
IMAGE_NAME: "homecentr/mkdocs"
IMAGE_NAME: "homecentr/mkdocs-material"

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master

env:
IMAGE_NAME: "homecentr/mkdocs"
IMAGE_NAME: "homecentr/mkdocs-material"

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/regular_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- cron: '0 6 * * *'

env:
IMAGE_NAME: "homecentr/mkdocs"
IMAGE_NAME: "homecentr/mkdocs-material"

jobs:
build:
Expand Down
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# HomeCentr - mkdocs
Used to generate the documentation site for Homecentr. The image contains [drawio-exporter](https://github.com/LukeCarrier/mkdocs-drawio-exporter) and all dependencies required for running from command line (i.e. in non-interactive environment). Since the set up is not completely straightforward, I thought it could be also useful to others :)
[![Project status](https://img.shields.io/badge/Project%20status-stable%20%26%20actively%20maintaned-green.svg)](https://github.com/homecentr/docker-mkdocs-material/graphs/commit-activity)
[![](https://img.shields.io/github/issues-raw/homecentr/docker-mkdocs-material/bug?label=open%20bugs)](https://github.com/homecentr/docker-mkdocs-material/labels/bug)
[![](https://images.microbadger.com/badges/version/homecentr/mkdocs-material.svg)](https://hub.docker.com/repository/docker/homecentr/mkdocs-material)
[![](https://img.shields.io/docker/pulls/homecentr/mkdocs-material.svg)](https://hub.docker.com/repository/docker/homecentr/mkdocs-material)
[![](https://img.shields.io/docker/image-size/homecentr/mkdocs-material/latest)](https://hub.docker.com/repository/docker/homecentr/mkdocs-material)

![CI/CD on master](https://github.com/homecentr/docker-mkdocs/workflows/CI/CD%20on%20master/badge.svg)
![Regular Docker image vulnerability scan](https://github.com/homecentr/docker-mkdocs/workflows/Regular%20Docker%20image%20vulnerability%20scan/badge.svg)


# HomeCentr - mkdocs material
This docker image is an enriched version of the original [squidfunk's mkdocs-material](https://github.com/squidfunk/mkdocs-material) and adds [drawio-exporter](https://github.com/LukeCarrier/mkdocs-drawio-exporter) on top of that. The set up of the [drawio-exporter](https://github.com/LukeCarrier/mkdocs-drawio-exporter) and it's dependencies is not completely straightforward so I thought it could be also useful to others :wink:

## Usage

Update your mkdocs.yml file according to the guide in [drawio-exporter](https://github.com/LukeCarrier/mkdocs-drawio-exporter). Note that the container is running as root by default which means you have to add the `--no-sandbox` argument as shown below.

```yml
plugins:
- drawio-exporter:
drawio_args:
- --no-sandbox
```

### Powershell

```Powershell
Expand All @@ -15,8 +34,20 @@ docker run --rm -it -p 8000:8000 -v ${$PWD}:/docs homecentr/mkdocs
docker run --rm -it -p 8000:8000 -v ${PWD}:/docs homecentr/mkdocs
```

### Exposed ports
## Exposed ports

| Port | Protocol | Description |
|------|------|-------------|
| 8000 | TCP | MkDocs development server |

## Volumes

| Port | Description |
| Container path| Description |
|------|-------------|
| 8000 | Development server |
| /docs | Default working directory, this should be the directory with the mkdocs.yml file |

## Security
The container is regularly scanned for vulnerabilities and updated. Further info can be found in the [Security tab](https://github.com/homecentr/docker-mkdocs/security).

### Container user
The container is tested to be running as a root. Given that it is a development container which should not be deployed anywhere and only used at build time this is an accepted feature.
3 changes: 3 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This repository covers the security of the container itself which is scanned for vulnerabilities every 24 hours. You can see the scan status in the [actions tab](https://github.com/homecentr/docker-mkdocs-material/actions?query=workflow%3A%22Regular+Docker+image+vulnerability+scan%22).

The dependencies are automatically scanned using [Dependabot](https://dependabot.com/). Dependencies are regularly updated. You can check the status by listing [open Pull requests](https://github.com/homecentr/docker-mkdocs-material/labels/dependencies) with the dependencies label.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"
services:
mkdocs:
build: .
image: homecentr/mkdocs:local
image: homecentr/mkdocs-material:local
volumes:
- ./example:/docs
ports:
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
"description": "",
"repository": {
"type": "git",
"url": "git+https://github.com/homecentr/docker-mkdocs.git"
"url": "git+https://github.com/homecentr/docker-mkdocs-material.git"
},
"author": "",
"license": "MIT",
"bugs": {
"url": "https://github.com/homecentr/docker-mkdocs/issues"
"url": "https://github.com/homecentr/docker-mkdocs-material/issues"
},
"homepage": "https://github.com/homecentr/docker-mkdocs#readme"
"homepage": "https://github.com/homecentr/docker-mkdocs-material#readme"
}
6 changes: 6 additions & 0 deletions tests/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
<attribute name="gradle_used_by_scope" value="test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
Expand Down
2 changes: 1 addition & 1 deletion tests/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/.idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>docker-mkdocs-tests</name>
<name>docker-mkdocs-material-tests</name>
<comment>Project tests created by Buildship.</comment>
<projects>
</projects>
Expand Down
Empty file added tests/bin/test/dummy
Empty file.
2 changes: 1 addition & 1 deletion tests/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'docker-mkdocs-tests'
rootProject.name = 'docker-mkdocs-material-tests'

0 comments on commit edf6ea8

Please sign in to comment.