docker: Build and serve content on http

Usage:

    docker-compose up --build
    x-www-browser http://localhost/Readme.html

Origin: https://github.com/rzr/rzr-presentations
Change-Id: Idb35900e551503f4777e0f6a8af8fb50c70e483b
Signed-off-by: Philippe Coval <rzr@users.sf.net>
This commit is contained in:
Philippe Coval 2020-03-05 11:07:58 +01:00
parent 0d947cbce6
commit b196389308
3 changed files with 72 additions and 0 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
# .dockerignore
.git/
# .gitignore
*~
*.html
*.elc

54
Dockerfile Normal file
View File

@ -0,0 +1,54 @@
#!/bin/echo docker build . -f
# -*- coding: utf-8 -*-
#
# SPDX-License: ISC
# SPDX-License-URL: https://spdx.org/licenses/ISC.txt
FROM httpd:2.4
LABEL maintainer="Philippe Coval (https://purl.org/rzr)"
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL en_US.UTF-8
ENV LANG ${LC_ALL}
RUN echo "#log: Configuring locales" \
&& set -x \
&& apt-get update \
&& apt-get install -y locales \
&& echo "${LC_ALL} UTF-8" | tee /etc/locale.gen \
&& locale-gen ${LC_ALL} \
&& dpkg-reconfigure locales \
&& sync
RUN echo "#log: Preparing system" \
&& set -x \
&& apt-get update -y \
&& apt-get install -y \
make \
sudo \
emacs \
wget \
git \
unzip \
# EOL
&& sync
ENV project org-reveal
ENV workdir /usr/local/apache2/htdocs/
ADD Makefile ${workdir}/
WORKDIR ${workdir}
RUN echo "#log: Setup ${project}" \
&& set -x \
&& make help \
&& make setup/debian sudo="" \
&& make setup \
&& sync
ADD . ${workdir}/
WORKDIR ${workdir}
RUN echo "#log: Building ${project}" \
&& set -x \
&& make download all \
&& sync

12
docker-compose.yml Normal file
View File

@ -0,0 +1,12 @@
#!/bin/echo docker-compose up --build
# -*- coding: utf-8 -*-
#
# SPDX-License: ISC
# SPDX-License-URL: https://spdx.org/licenses/ISC.txt
version: "2"
services:
default:
build: .
network_mode: "host"