Ubuntu base docker image for build tcl packages

Table of Contents
Login

About

This is ubuntu base docker image (version 20.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.

Installation

Download from dockerhub

docker pull oupfiz5/tcl-build:latest
docker pull oupfiz5/tcl-build:20.04

Build from chiselapp (fossil)

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 .

Build from github

git clone https://github.com/oupfiz5/tcl-build.git
cd tcl-build
docker build -t oupfiz5/tcl-build .

Configuration options

General options

Option Default Description
TZ UTC Set timezone, example Europe/Moscow

Timezone

Set the timezone for the container, defaults to UTC. To set the timezone set the desired timezone with the variable TZ.

docker run -it --rm \
           --name tcl-build  \
           --env 'TZ=Europe/Moscow' \
           oupfiz5/tcl-build:latest \
           /bin/bash

Usage

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:latest

Build Naviserver in tcl-build using a docker exec:

docker exec -it tcl-build bash /builds/ns-all-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

Prepare source packages

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.

CI/CD

For build and push docker images using Github Actions workflow.

Maintenance

Log output

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

Shell access

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