From d0d2b734694927034803f6041cd29cfdf5b97a7e Mon Sep 17 00:00:00 2001 From: Alexander Haase Date: Sun, 4 Aug 2024 00:08:35 +0200 Subject: [PATCH] Add Dockerfile for building the theme --- Dockerfile | 32 ++++++++++++++++++++++++++++++++ README.md | 26 ++++++++++++++++++++++---- 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d8997ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# This file is part of nginx-fancyindex-flat-theme. +# +# nginx-fancyindex-flat-theme is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at your +# option) any later version. +# +# nginx-fancyindex-flat-theme is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along with +# this program. If not, see +# +# http://www.gnu.org/licenses/ +# +# +# Copyright (C) +# 2018-2024 Alexander Haase + +FROM debian + +ENV DEBIAN_FRONTEND=noninteractive +RUN apt update && \ + apt install -y \ + make \ + uglifyjs \ + node-less \ + node-less-plugin-clean-css \ + && \ + rm -rf /var/lib/apt/lists/* diff --git a/README.md b/README.md index fc6bf82..dd301d9 100644 --- a/README.md +++ b/README.md @@ -24,10 +24,11 @@ dynamic code. ## Usage -1. Get the latest resources from [GitHub releases](https://github.com/alehaa/nginx-fancyindex-flat-theme/releases) - or build them on your own by running `make` inside this repository and copy - these files into any location accessible by *nginx*. -2. Configure your vhost to use the theme's resources for fancyindex: +1. Get the latest resources from [GitHub releases][releases], or build them + yourself by running `make` inside this repository. Instructions on how to + build the resources can be found [below](#build). +1. Copy these files into any location accessible by *nginx*. +1. Configure your vhost to use the theme's resources for fancyindex: ``` # Fancyindex fancyindex on; @@ -43,6 +44,23 @@ dynamic code. } ``` +[releases]: https://github.com/alehaa/nginx-fancyindex-flat-theme/releases + + +## Build + +Instead of using pre-built sources, you can build them on a local machine. For +convenience, a [Dockerfile](Dockerfile) is provided that creates a container +with all the necessary tools to compile the sources. You can easily build the +theme using the following commands: + +``` +docker build -t fancyindex-flat . +docker run --rm -it -v ./:/mnt -w /mnt fancyindex-flat make +``` + +The compiled sources for the theme will be located in the `build` directory. + ## License