- About
- Prerequisite
- Installation
- Configuration options
- Applications
- Usage
- Prepare source packages
- Continues Integration
- Maintenance
This is ubuntu base docker image (version 22.04) using s6-overlay for buid tcl software. The basic idea was taken from tcl2020-build .
Tcl-build is self-hosting at https://chiselapp.com/user/oupfiz5/repository/tcl-build.
If you are reading this on GitHub, then you are looking at a Git mirror of the self-hosting tcl-build 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 tcl-build, 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 (todo)
- Trivy (todo)
docker pull oupfiz5/tcl-build:latest
docker pull oupfiz5/tcl-build:23.05
fossil clone https://chiselapp.com/user/oupfiz5/repository/tcl-build tcl-build.fossil
mkdir tcl-build
cd tcl-build
fossil open ../tcl-build.fossil
docker build -t oupfiz5/tcl-build .
git clone https://github.com/oupfiz5/tcl-build.git
cd tcl-build
docker build -t oupfiz5/tcl-build .
Arguments | Default | Description |
---|---|---|
BUILD_DATE | none | Set build date for label |
FOSSIL_VERSION | 2.21 | Set upload fossil version |
VERSION | none | Set version for label |
docker build \
--build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
--build-arg VERSION='23.05' \
--build-arg FOSSIL_VERSION='2.21' \
--tag oupfiz5/tcl-build:23.05 \
--file ./Dockerfile \
.
For configuration is using environment variables.
Option | Default | Description |
---|---|---|
TZ | UTC | Set timezone, example Europe/Moscow |
Set the timezone for the container, defaults to UTC. To set the timezone set the desired timezone with the variable TZ.
mkdir -p $(pwd)/workspaces
docker run -itd \
-v $(pwd)/workspaces:/workspaces\
-v $(pwd)/builds:/builds \
--env 'TZ=Europe/Moscow' \
--name=tcl-build \
oupfiz5/tcl-build:23.05
The docker support builds for the following applications:
- tcl
- tcllib
- rl_json
- NaviServer (modules)
- tDOM
- xotcl
For configuration is using docker environment variable and/or builds/env-vars.sh
Option | Default | Description |
---|---|---|
PREFIX | /usr | Default values for prefix |
NS_VERSION | 4.99.24 | Define NaviServer version |
NS_MODULES_VERSION | 4.99.24 | Define NaviServer modules version |
RL_JSON_VERSION | 0.12.2 | Define RL_JSON version |
TCL_VERSION | 8.6.13 | Define tcl version |
TCLLIB_VERSION | 1.20 | Define tcl lib version |
TDOM_VERSION | 0.9.1 | Define tdom version |
XOTCL_VERSION | 2.4.0 | Define xotcl version |
Run the build container in the background with Docker:
mkdir -p $(pwd)/workspaces
docker run -itd \
-v $(pwd)/workspaces:/workspaces \
-v $(pwd)/builds:/builds \
--name=tcl-build \
oupfiz5/tcl-build:23.05
Build all program in tcl-build using a docker exec
and default congratulations:
docker exec -it tcl-build bash /builds/all-build.sh
Build any applications with version customization in tcl-build using docker exec
. For example install tcl version 8.6.11 is:
docker exec -it \
-e TCL_VERSION=8.6.13 \
tcl-build \
bash /builds/tcl-build.sh
Modify the source code of any package in the workspaces directory. Then you can use make, cmake, … to rebuild the container with the changes. Use the build container with your favorite IDE.
Source packages are added to the Docker image using the builds/build-all.sh
script.
To add packages or features create a two shell scripts in builds
directory. One shell script will download the source package: yourpackage-download.sh
. The other script will build the package: yourpackage-build.sh
. Add your new build script, yourpackage-build.sh
, to builds/all-build.sh
.
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=tcl-build \
oupfiz5/tcl-build:latest \
/bin/bash
For debugging and maintenance purposes you may want access the containers shell. If you are usingDocker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:
docker exec -it tcl-build /bin/bash