How to create simple documentation server

Untitled

To share /expose document content as a simple webserver using python and asciidoctor.

  • Follow below steps:

  • Create directory asciidoc

  • Create Dockerfile as shown below

Dockerfile
FROM alpine

RUN apk add --no-cache python3 bash sudo

RUN apk add asciidoctor

COPY ["*.adoc", "/"]

RUN asciidoctor *.adoc

ENTRYPOINT ["python3", "-m" ,"http.server", "9000"]
  • Copy this docker file and required asciidoctor(.adoc) files to be exposed on web server

  • Make sure to have index.adoc as default page

  • RUN below command to create docker image

build.sh
 docker build . -t asciidoctor
  • RUN below command to start the server

filename.sh
docker run -d -p 8084:9000 --name docserver asciidoctor:latest

Comments

Popular posts from this blog

IBM Datapower GatewayScript

Spring boot Kafka Integration

Spring boot SOAP Web Service Performance