Skip to content

Commit

Permalink
Merge pull request #257 from asciidoctor/updatecli_1b0fc1f5cf265588b5…
Browse files Browse the repository at this point in the history
…2ac2b95159e38fe299c0f8f58e6bf3add557f128e5bd1e

[updatecli] Bump Alpine Linux Version to 3.15.4
  • Loading branch information
dduportal authored Apr 6, 2022
2 parents 40d6e55 + fc12589 commit 66038ba
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG alpine_version=3.15.3
ARG alpine_version=3.15.4
FROM alpine:${alpine_version} AS base

ARG asciidoctor_version=2.0.17
Expand Down
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:ALPINE_VERSION: 3.15.3
:ALPINE_VERSION: 3.15.4
:ASCIIDOCTOR_VERSION: 2.0.17
:ASCIIDOCTOR_CONFLUENCE_VERSION: 0.0.2
:ASCIIDOCTOR_PDF_VERSION: 1.6.2
Expand Down
46 changes: 42 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

This Docker image provides:

- [Asciidoctor](https://asciidoctor.org/) 2.0.16
- [Asciidoctor](https://asciidoctor.org/) 2.0.17

- [Asciidoctor Diagram](https://asciidoctor.org/docs/asciidoctor-diagram/) 2.2.1 with ERD and Graphviz integration (supports plantuml and graphiz diagrams)

- [Asciidoctor PDF](https://asciidoctor.org/docs/asciidoctor-pdf/) 1.6.1
- [Asciidoctor PDF](https://asciidoctor.org/docs/asciidoctor-pdf/) 1.6.2

- [Asciidoctor EPUB3](https://asciidoctor.org/docs/asciidoctor-epub3/) 1.5.1

Expand All @@ -28,15 +28,31 @@ This Docker image provides:

- [Asciidoctor Kroki](https://github.com/Mogztter/asciidoctor-kroki) 0.5.0

This image uses Alpine Linux 3.13.5 as base image.
This image uses Alpine Linux 3.15.4 as base image.

<div class="note">

Docker Engine [20.10](https://docs.docker.com/engine/release-notes/#20100) or later is required (or any container engine supporting [Alpine 3.14](https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0)) to avoid unexpected `No such file or directory` errors (such as [\#214](https://github.com/asciidoctor/docker-asciidoctor/issues/214) or [\#215](https://github.com/asciidoctor/docker-asciidoctor/issues/215)).

</div>

## How to use it

Just run:

docker run -it -v <your directory>:/documents/ asciidoctor/docker-asciidoctor

Docker maps your directory with */documents* directory in the container.
or the following for [Podman](https://podman.io/):

podman run -it -v <your directory>:/documents/ docker.io/asciidoctor/docker-asciidoctor

Docker/Podman maps your directory with */documents* directory in the container.

<div class="note">

You might need to add the option `:z` or `:Z` like `<your directory>:/documents/:z` or `<your directory>:/documents/:Z` if you are using SELinux. See [Docker docs](https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label) or [Podman docs](https://docs.podman.io/en/latest/markdown/podman-run.1.html#volume-v-source-volume-host-dir-container-dir-options).

</div>

After you start the container, you can use Asciidoctor commands to convert AsciiDoc files that you created in the directory mentioned above.
You can find several examples below.
Expand All @@ -53,6 +69,12 @@ You can find several examples below.
asciidoctor-pdf -r asciidoctor-diagram sample-with-diagram.adoc
asciidoctor-epub3 -r asciidoctor-diagram sample-with-diagram.adoc

- To run AsciiDoc on an AsciiDoc file that contains latexmath and stem blocks:

asciidoctor -r asciidoctor-mathematical sample-with-diagram.adoc
asciidoctor-pdf -r asciidoctor-mathematical sample-with-diagram.adoc
asciidoctor-epub3 -r asciidoctor-mathematical sample-with-diagram.adoc

- To use Asciidoctor Confluence:

asciidoctor-confluence --host HOSTNAME --spaceKey SPACEKEY --title TITLE --username USER --password PASSWORD sample.adoc
Expand All @@ -71,6 +93,10 @@ You can find several examples below.

docker run --rm -v $(pwd):/documents/ asciidoctor/docker-asciidoctor asciidoctor-pdf index.adoc

or:

podman run --rm -v $(pwd):/documents/ docker.io/asciidoctor/docker-asciidoctor asciidoctor-pdf index.adoc

## How to contribute / do it yourself?

### Requirements
Expand All @@ -85,6 +111,8 @@ You need the following tools:

- Docker installed and in your path

- [Trivy](https://github.com/aquasecurity/trivy) cli in case you want to scan images for vulnerabilities

### How to build and test?

- Bats is used as a test suite runner. Since the ability to build is one way of testing, it is included.
Expand All @@ -102,6 +130,16 @@ Optionally, you can specify a custom image name:
export DOCKER_IMAGE_NAME_TO_TEST=your-image-name
bats tests/*.bats

### How to scan for vulnerabilities?

- Trivy scans a docker image looking for software versions containing known vulnerabilities (CVEs).
It’s always a good idea to scan the image to ensure no new issues are introduced.

- Run the following command to replicate the repo’s `CVE Scan` pipeline on an image build locally.
Note the pipeline runs nightly on the latest release version, so it can display issues solved in main branch.

trivy image --severity HIGH,CRITICAL asciidoctor:latest

#### Deploy

The goal for deploying is to make the Docker image available with the correct Docker tag in Docker Hub.
Expand Down
2 changes: 1 addition & 1 deletion tests/asciidoctor.bats
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bats

TMP_GENERATION_DIR="${BATS_TEST_DIRNAME}/tmp"
ALPINE_VERSION=3.15.3
ALPINE_VERSION=3.15.4
ASCIIDOCTOR_VERSION=2.0.17
ASCIIDOCTOR_CONFLUENCE_VERSION=0.0.2
ASCIIDOCTOR_PDF_VERSION=1.6.2
Expand Down

0 comments on commit 66038ba

Please sign in to comment.