- About
- Prerequisite
- Installation
- Configuration options
- Quickstart
- Continues integration
- Troubleshooting
This is NaviServer on ubuntu base docker image (version 22.04) using s6-overlay. To install the NaviServer I used code from Gustaf Neumann script install-ns.sh. The base image is oupfiz5/ubuntu-s6.
Naviserver-S6 is self-hosting at https://chiselapp.com/user/oupfiz5/repository/naviserver-s6.
If you are reading this on GitHub, then you are looking at a Git mirror of the self-hosting Naviserver-S6 repository. The purpose of that mirror is to test and exercise Fossil's ability to export a Git mirror and using Github CI/CD (Github Actions). Nobody much uses the GitHub mirror, except to verify that the mirror logic works. If you want to know more about Naviserver-S6, visit the official self-hosting site linked above.
- *nix operation system
- Install Docker
- Install git (optional)
- Install fossil (optional)
They are using for testing and scanning:
- Bats
- Shellcheck
- Hadolynt
- Dockle
- Snyk - not necessarily
- Trivy - not necessarily
docker pull oupfiz5/naviserver-s6:4.99.24
fossil clone https://chiselapp.com/user/oupfiz5/repository/naviserver-s6 naviserver-s6.fossil
mkdir naviserver-s6
cd naviserver-s6
fossil open ../naviserver-s6.fossil
Build image using multi steps (by means of docker from oupfiz5/tcl-build):
docker build -t oupfiz5/naviserver-s6:4.99.24 -f ./Dockerfile .
git clone https://github.com/oupfiz5/naviserver-s6.git
cd naviserver-s6
docker build -t oupfiz5/naviserver-s6 .
Build image using multi steps (by means of docker from oupfiz5/tcl-build):
docker build -t oupfiz5/naviserver-s6:4.99.24 -f ./Dockerfile .
Arguments | Default | Description |
---|---|---|
BUILD_DATE | none | Set build date for label |
NS_VERSION | 4.99.24 | Define version for Naviserver-S6 |
NS_MODULE_VERSION | 4.99.24 | Define version for Naviserver-S6 modules |
TCL_VERSION | 8.6.13 | Define version for tcl |
TCLLIB_VERSION | 1.1.20 | Define version for tcllib |
TDOM_VERSION | 0.9.1 | Define version for tdom |
RL_JSON_VERSION= | 0.12.2 | Define version for rl_json |
XOTCL_VERSION | 2.4.0 | Define version for xotcl |
docker build --no-cache \
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--build-arg NS_VERSION='4.99.24' \
--build-arg TCL_VERSION='8.6.13' \
-t oupfiz5/naviserver-s6:4.99.24 \
-f ../Dockerfile \
../.
Option | Default | Description |
---|---|---|
TZ | UTC | Set timezone, example Europe/Moscow |
HTTP | 8090 | Set http listen port, example 18090 |
Configuration file | nsd-config.tcl | Configuration file for Naviserver |
Set the timezone for the container, defaults to UTC. To set the timezone set the desired timezone with the variable TZ.
docker run -itd \
--restart always \
--name=naviserver-s6-s6 \
--env 'TZ=Europe/Moscow' \
-p 127.0.0.1:8090:8080 \
oupfiz5/naviserver-s6:4.99.24
Set the http listen port for the container -p 127.0.0.1:18090:8080
. In this case the Naviserver-S6 is accessible by URL http://localhost:18090.
docker run -itd \
--restart always \
--name=naviserver-s6 \
-p 127.0.0.1:18090:8080 \
oupfiz5/naviserver-s6:4.99.24
The default configuration file is rootfs/usr/local/ns/conf/nsd-config.tcl
. For using own configuration file you can apply docker mount option:
-
Create own configuration file with name
nsd-config.tcl
-
Put it to some directory (for example
rootfs/usr/local/ns/conf/test
) -
Mount the the directory from item 2 as
/usr/local/ns/conf
docker run -itd \ --restart always \ --name=naviserver \ -p 127.0.0.1:8090:8080 \ --mount type=bind,src=$(pwd)/rootfs/usr/local/ns/conf/test,destination=/usr/local/ns/conf \ oupfiz5/naviserver:4.99.24
Start Naviserver using CLI:
docker run -itd \
--restart always \
--name=naviserver-s6 \
-p 127.0.0.1:8090:8080 \
oupfiz5/naviserver-s6:4.99.24
Start Naviserver using script start.sh
:
./start.sh
After start open the naviserver will be accessible by url http://localhost:8090
For build and push docker images using Github Actions workflow. Flow process is GitHub flow.
For debugging and maintenance purposes you may want access the output log. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker interactive:
docker run -it --rm \
--name=naviserver-s6 \
-p 127.0.0.1:8090:8080 \
oupfiz5/naviserver-s6:latest
For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:
docker exec -it naviserver-s6 /bin/bash