A containerized version of the devuan live sdk that customizes a blend directory, creates a new git repo for it and outputs and iso.
Go to file
cyteen c9a53020da The readme and run scripts it decribes.
These are the run scripts used as a basis for the docker-compose.yml
2024-04-29 16:42:33 +01:00
bin Initial commit. 2024-04-28 08:21:04 +01:00
extra/syslinux Initial commit. 2024-04-28 08:21:04 +01:00
live-sdk@ad40af151e Initial commit. 2024-04-28 08:21:04 +01:00
.env Initial commit. 2024-04-28 08:21:04 +01:00
.gitattributes Initial commit. 2024-04-28 08:21:04 +01:00
.gitignore Initial commit. 2024-04-28 08:21:04 +01:00
.gitmodules Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile-e17 Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile-plain Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile-submodule-e17 Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile-submodule-e17.README Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile-test Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile.david Initial commit. 2024-04-28 08:21:04 +01:00
Dockerfile.markm Initial commit. 2024-04-28 08:21:04 +01:00
README.md The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
TODO.md The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
build-plain.sh Initial commit. 2024-04-28 08:21:04 +01:00
build.sh Initial commit. 2024-04-28 08:21:04 +01:00
build_with_submodules.sh Initial commit. 2024-04-28 08:21:04 +01:00
docker-compose.yml Initial commit. 2024-04-28 08:21:04 +01:00
packages.list Initial commit. 2024-04-28 08:21:04 +01:00
packages.list-ascii Initial commit. 2024-04-28 08:21:04 +01:00
pkgs_auto.list Initial commit. 2024-04-28 08:21:04 +01:00
pkgs_auto.list-ascii Initial commit. 2024-04-28 08:21:04 +01:00
pkgs_manual.list Initial commit. 2024-04-28 08:21:04 +01:00
pkgs_manual.list-ascii Initial commit. 2024-04-28 08:21:04 +01:00
run-it-plain.sh The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
run-it.sh The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
run-it_sm.sh The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
run-it_sm_part2.sh The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
run.sh The readme and run scripts it decribes. 2024-04-29 16:42:33 +01:00
zshenv Initial commit. 2024-04-28 08:21:04 +01:00

README.md

Docker container for building devuan iso images using the official devuan-live-sdk.

Basic functionality

The Dockerfile will take a git repo of a blend directory as a template, apply changes to it and commit the result as a new repo.

The container can then be used to build an ISO image based on that new blend.

This ISO should be managed by git LFS by:

.gitattributes:

dist/\*_/_.iso filter=lfs diff=lfs merge=lfs -text

Outline

Put your TEMPLATE_NAME blend under version control or choose someone else's.

GITLAB_URL, TEMPLATE_NAME, BLEND_NAME are ARGS that can be passed to docker build, the passwords should be managed via ssh-agent

NB. You might need docker 19.03 or above with

  • { "features": { "buildkit": true } } in /etc/docker/daemon.json
  • # syntax = docker/dockerfile:1.2-labs at the top of your Dockerfile
  • RUN --mount=type=ssh before any command needing a password

See Dockerfile build enhancement documentation.

Installing with 020_docker.sh will install from docker sources.list and configure these features.

docker build \
    --build-arg GITLAB_URL=git.devuan.org \
    --build-arg TEMPLATE_NAME=devuan-beowulf-live-e17 \
    --build-arg BLEND_NAME=live-zfs-e17

Change the URL for the submodules:

  • TEMPLATE_NAME the blend to base the new blend on. DEFAULT devuan-beowulf-live-e17
  • BLEND_NAME the new unique blend to create. DEFAULT live-zfs-e17
  • GITLAB_URL the repo address for the template and the new blend DEFAULT git.devuan.org

Building

build-with-submodules

Given git credentials, a template name, a blend name and a blend version number for the new blend the docker build will prepare the new containing to build the new devuan iso.

docker build \
  --squash \
  --progress=plain \
  --no-cache \
  --ssh default \
  --build-arg GITLAB_USER="cyteen" \
  --build-arg GITLAB_URL="git.ring-zero.co.uk" \
  --build-arg GITLAB_PORT="10022" \
  --build-arg APT_MIRROR="https://pkgmaster.devuan.org/merged" \
  --build-arg TEMPLATE_NAME="devuan-beowulf-live-e17" \
  --build-arg RELEASE="beowulf" \
  --build-arg BLEND_NAME="live-zfs-e17" \
  --build-arg BLEND_VERS="3.0-test-$(date +%Y-%m-%d)" \
  --build-arg GIT_EMAIL_NAME="cyteen" \
  --build-arg GIT_EMAIL_URL="ring-zero.co.uk" \
  --build-arg GIT_NAME="Cyteen May" \
  -t markm/devuan-live-sdk_sm:latest \
  -t markm/devuan-live-sdk_sm  \
  -f ./Dockerfile-submodule-e17 \
  .

Running

  • run.sh - just run the container non-interactively
  • run-it.sh - run the container interactively with /bin/zsh

Two stage build

  • run-it_sm.sh - first part of the build, interactively:
markm/devuan-live-sdk_sm \
  /bin/zsh -f -c source sdk
  • run-it_sm.sh - second part of the build, interactively:
markm/devuan-live-sdk_sm_part2 \
  /bin/zsh -f -c source sdk

Compose

docker-compose.yml and .env

version: "3.8"
services:
  devuan-live-sdk:
    image: markm/devuan-live-sdk_sm:latest
    build:
      context: .
      dockerfile: Dockerfile-submodule-e17
      args:
        GITLAB_USER: ${GITLAB_USER}
        GITLAB_URL: ${GITLAB_URL}
        GITLAB_PORT: ${GITLAB_PORT}
        APT_MIRROR: ${APT_MIRROR}
        TEMPLATE_NAME: ${TEMPLATE_NAME}
        RELEASE: ${RELEASE}
        BLEND_NAME: ${BLEND_NAME}
        BLEND_VERS: ${BLEND_VERS}
        GIT_EMAIL_NAME: ${GIT_EMAIL_NAME}
        GIT_EMAIL_URL: ${GIT_EMAIL_URL}
        GIT_NAME: ${GIT_NAME}
    volumes:
      - ./dist:/live-sdk/dist
      - ./log:/live-sdk/log
    privileged: true
    command: --
    ```