Skip to content

Commit

Permalink
Add docker example
Browse files Browse the repository at this point in the history
Add simple Dockerfile and instructions on how to use it. This is a
good starting point to configure your system.
  • Loading branch information
wallento committed Oct 20, 2019
1 parent 194a490 commit cb5a9b0
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 12 deletions.
9 changes: 9 additions & 0 deletions src/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM ubuntu:18.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get dist-upgrade && apt-get -y install python3 python3-pip texlive-latex-base texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk
COPY requirements.txt /tmp
RUN pip3 install -r /tmp/requirements.txt
VOLUME /tmp/src
WORKDIR /tmp/src
CMD make -C b3 html latexpdf
48 changes: 48 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
WISHBONE Specification Sources
==============================

Those are the ReStructuredText (RST) sources for the Wishbone
specification. To build the sources, follow one of the following
guides.

Using Docker
------------

Just create the container:

```
docker build -t wishbone-bld .
```

Then build the documentation:

```
docker run -it -v $PWD:/tmp/src wishbone-bld make -C b3 html latexpdf
```

On your system
--------------

You can just use your standard Python installation. If you want to
build the PDF you will need the texlive installtion. On Ubuntu 18.04
the following should suffice to build the documentation:

```
apt-get -y install python3 python3-pip texlive-latex-base texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra latexmk
```

To install the Python dependencies globally:

```
pip3 install -r requirements.txt
make -C b3 latexpdf html
```

The preferred way is to use Python virtual environments (venv):

```
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
make -C b3 latexpdf html
```
12 changes: 0 additions & 12 deletions src/REDME.md

This file was deleted.

0 comments on commit cb5a9b0

Please sign in to comment.