Commit 1e791743 authored by Jan-Philipp Stauffert's avatar Jan-Philipp Stauffert
Browse files

Remove the old Dockerfile and support

parent 3c7773a3
#Ubuntu just provides the the best toolbox for decker, the offical Haskell immage doesn't have all dependencies
#The 17.10 as a rolling release is used because of the sass-compiler
# source of the missing dependecy:
# if the 18:04 LTS is available this one is automatically used, maybe then it can be set it as a fixed base-mage
FROM ubuntu:rolling
#update the packages and install all haskell-stack dependencies, for some reasons an extra gcc is required
gcc \
git \
wget \
#install haskell-stack
RUN wget -qO- | sh
#install all decker dependencies
RUN apt-get install -y \
graphviz \
gnuplot \
rsync \
sassc \
unzip \
#for pdf-features:
RUN apt-get install -y \
pdf2svg \
#add the later location of decker binary to the PATH
ENV PATH="/root/.local/bin:${PATH}"
#cloning the decker repo with HTTPS to avoid SSH-Key hazzle, otherwise the SSH-key has to be added to the container with 'ADD'
RUN git clone
#change to the decker source-folder
WORKDIR /decker
#the git checkout is a stable release under ubuntu, maybe this could be solved nicer
#a checkout by a tag would of course be better
RUN git checkout cb68693de73576cff738a531a65229191351030b
#install decker from the source
RUN make install
#set the encoding on UTF-8, so the parser works correctly, german language is also added for umlaute
#source of fix:
RUN apt-get install --reinstall -y locales && \
sed -i 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
locale-gen de_DE.UTF-8
RUN dpkg-reconfigure --frontend noninteractive locales
#cleanup to get a smaller image
RUN apt-get clean autoclean && \
apt-get autoremove -y
#Create a loction for the volume with the decker-files
RUN mkdir served-files
#serving Files
CMD [ "sh", "-c", "cd /served-files/; decker server" ]
#open the port for mapping
Expose 8888
# Usage:
Note: On some systems docker may requires super user previliges.
1. Install [Docker]( on your host-OS.
2. Download the `docker` directory.
3. Change the directory to this one: `cd <path/to/dir/docker>`
4. Put your sildes in the `served-files` directory.
5. Run: `docker build -t decker .` to build the image.
6. Run: `docker run -d -p 80:8888 -v "$PWD"/served-files:/served-files --name my-decker decker` to run the image in a container.
Now you have the slides on your [localhost](http://localhost).
## How it works:
Decker with all dependencies runs in a Docker-container.
The `served-files` is mounted as a volume in the Docker-container.
# This a test
- It seems that the Server is working :)
# Your silde could be here
- Copy your Decker-files to the ´servedFiles´
- Restart the Container
......@@ -72,6 +72,22 @@ a HTML document, or a PDF document, depending on the file name.
Markdown files ending on `*` are translated into corresponding HTML
or PDF documents.
### Docker container
We provide prebuild docker containers. You may use them in a directory to build the html slides with
docker run --rm -it -v `pwd`:/decker -p 8888:8888 html
or for Windows
docker run --rm -it -v %cd%:/decker -p 8888:8888 html
Exchange the `html` at the end of the command with your *decker* command of choice. Beware that file updates are not propagated into the container so `decker server` will not auto refresh.
## *decker* targets
- `decker help`
Markdown is supported
0% or .
Finish editing this message first!
Please register or to comment