Skip to content

Commit c41ff47

Browse files
author
Jarkko Haapalainen
authored
Merge pull request #1633 from 7ojo/master
Added Dockerfile and instructions to CONTRIBUTING.md
2 parents 9518b15 + 512f572 commit c41ff47

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ in the [#perl6 IRC channel](https://perl6.org/community/irc).
3030
- [Mojolicious / Web Server](#mojolicious--web-server)
3131
- [SASS compiler](#sass-compiler)
3232
- [Build and view the documentation](#build-and-view-the-documentation)
33+
- [Using Docker](#using-docker)
3334

3435
## General principles
3536

@@ -262,3 +263,16 @@ render the HTML documentation
262263

263264
Now point your web browser to http://localhost:3000 to view the
264265
documentation.
266+
267+
#### Using Docker
268+
269+
You can skip all the above and just build and view documentation with these simple commands (if you have docker already installed):
270+
271+
$ docker build -t perl6-doc .
272+
$ docker run -p 3000:3000 -it -v `pwd`:/doc perl6-doc
273+
274+
This will build the documentation for you by default and it will take some time, but for subsequent use you may want to skip build part if nothing has been changed:
275+
276+
$ docker run -p 3000:3000 -it -v `pwd`:/doc perl6-doc bash -c "perl app.pl daemon"
277+
278+
Now point your web browser to http://localhost:3000 to view the documentation.

Dockerfile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
FROM rakudo-star:latest
2+
3+
RUN curl -sL https://deb.nodesource.com/setup_6.x | bash -
4+
5+
RUN apt-get --yes --no-install-recommends install \
6+
ruby-sass \
7+
cpanminus \
8+
build-essential \
9+
nodejs \
10+
graphviz \
11+
;
12+
13+
RUN zef install Pod::To::HTML Pod::To::BigPage
14+
15+
RUN cpanm -vn Mojolicious
16+
17+
RUN cpanm -vn CSS::Sass Mojolicious::Plugin::AssetPack
18+
19+
RUN mkdir /doc
20+
21+
WORKDIR /doc
22+
23+
EXPOSE 3000
24+
25+
CMD bash -c "make init-highlights && perl6 htmlify.p6 && perl app.pl daemon"

0 commit comments

Comments
 (0)