These are the run scripts used as a basis for the docker-compose.yml |
||
|---|---|---|
| bin | ||
| extra/syslinux | ||
| live-sdk@ad40af151e | ||
| .env | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| Dockerfile-e17 | ||
| Dockerfile-plain | ||
| Dockerfile-submodule-e17 | ||
| Dockerfile-submodule-e17.README | ||
| Dockerfile-test | ||
| Dockerfile.david | ||
| Dockerfile.markm | ||
| README.md | ||
| TODO.md | ||
| build-plain.sh | ||
| build.sh | ||
| build_with_submodules.sh | ||
| docker-compose.yml | ||
| packages.list | ||
| packages.list-ascii | ||
| pkgs_auto.list | ||
| pkgs_auto.list-ascii | ||
| pkgs_manual.list | ||
| pkgs_manual.list-ascii | ||
| run-it-plain.sh | ||
| run-it.sh | ||
| run-it_sm.sh | ||
| run-it_sm_part2.sh | ||
| run.sh | ||
| zshenv | ||
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-labsat the top of your DockerfileRUN --mount=type=sshbefore 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-interactivelyrun-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: --
```