diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..485dee64bcfb48793379b200a1afd14e85a8aaf4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..0b51ea0056870bd710a022025aa12ab941911453 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +FROM node:8-alpine + +RUN apk --no-cache add --virtual .build-deps g++ libressl-dev make python curl-dev \ + && env BUILD_ONLY=true yarn global add @antora/cli @antora/site-generator-default \ + && apk del .build-deps \ + && apk --no-cache add libcurl libressl2.5-libtls \ + && mv $(yarn cache dir)/npm-nodegit-[0-9]* /tmp/ \ + && rm -rf $(yarn cache dir)/* \ + && find /tmp/npm-nodegit-* -regex '.*/\(include\|src\|vendor\)$' -maxdepth 1 -exec rm -rf {} \; \ + && find /tmp/npm-nodegit-*/lifecycleScripts/*install.js -exec sed -i '1s/^/return;\n/' {} \; \ + && mv /tmp/npm-nodegit-* $(yarn cache dir)/ \ + && find $(yarn global dir)/node_modules/nodegit -regex '.*/\(include\|src\|vendor\)$' -maxdepth 1 -exec rm -rf {} \; \ + && rm -rf $(yarn global dir)/node_modules/nodegit/build/Release/.deps + +WORKDIR /antora + +ENTRYPOINT ["antora"] +CMD ["--help"] diff --git a/README.adoc b/README.adoc index e70a7daebc3e467572236df545a1fb0325695052..ff608f741e18291c5e4be65600f03749caf00aa7 100644 --- a/README.adoc +++ b/README.adoc @@ -14,16 +14,35 @@ Its site generator pipeline aggregates documents from versioned content reposito === Run Directly +Assuming you have repository containing `Antora` playbook cloned to some folder and `cd` into that folder. + +As an example https://gitlab.com/antora/demo/demo-site[demo-site] will be used. + + $ git clone https://gitlab.com/antora/demo/demo-site.git + $ cd demo-site + You can run this image directly using the `docker run` command: -#TODO# show `docker run` command + $ docker run -v `pwd`:/antora antora --stacktrace generate site.yml === Use as a Base Image You can use this image as a base for your own image. -Create a `Dockerfile` file and add the following line at the top: -#TODO# show the `FROM` command in a sample Dockerfile +. Create a `Dockerfile` file and add the following line at the top:: ++ +[source] +.Dockerfile.custom +---- +FROM antora + +RUN yarn global add asciidoctor-plantuml <1> +---- +<1> add custom `Asciidoctor.js` extension to base image + +. Then build ++ + $ docker build -t antora:custom -f Dockerile.custom . == Copyright and License