Docker image for openmamba buildvm
Go to file
2024-04-24 14:16:33 +02:00
rootfiles builddeps: added ghc 2024-04-24 14:16:33 +02:00
Dockerfile first commit 2024-04-17 22:16:59 +02:00
README.md README.md: fix autoport-launcher cron entry 2024-04-19 16:19:02 +02:00

docker image for openmamba buildvm

This project provides a Dockerfile and related files which can be easily used to create a Docker image and container set up with autodist and webbuild with the purpose to maintain and build openmamba RPM packages.

The project can be used on any O.S. with docker installed and supporting one of the following platforms:

  • linux/amd64 (x86_64)
  • linux/arm64 (aarch64)
  • linux/386 (i586)

Installation

Create image with: docker build -t buildvm .

Create and start a new container with: docker run --name buildvm -d -p 80:80 buildvm

A different name and local port mapping may be used as needed.

Container management

Stop with: docker stop buildvm

Restart with: docker start buildvm

Usage

Webbuild web interface

With a browser access the webbuild interface at:

http://localhost

To access from another host you may replace localhost with the container host (remember to check that exposed port is open in firewall).

Login with the following credentials:

  • Username: autodist
  • Password: openmamba

Remote host and different port mapping may be used as needed.

Spawn a shell into the running container with: docker exec -it --user root buildvm /bin/bash

Or as autodist user: docker exec -it --user autodist buildvm /bin/bash

Autoport cron job

autoport is specifically intented for openmamba maintainer to port packages to required architectures. The involced configuration is file:

/etc/sysconfig/autoport

Autoport needs to be globally enabled with setting:

AUTOPORT_ENABLE=1

Port configurations are defined in the same file inside array variables, in this example we use the first configuration with array index of 0:

AUTOPORT_ARCH[0]=aarch64 AUTOPORT_DISABLE[0]= AUTOPORT_CHROOT_USER[0]=autodist AUTOPORT_NATIVE[0]=1 AUTOPORT_REPOSITORIES[0]="devel-makedist devel-kernel devel-autodist devel-misc" AUTOPORT_PORT_REPOSITORY[0]="#SELF" AUTOPORT_BASE_REPOSITORY[0]="devel-autodist" AUTOPORT_IMPORT_REPOSITORIES[0]="$AUTOPORT_DEVEL_IMPORT_REPOSITORIES"

The command to run autoport batch process for configuration with index 0 is:

docker exec -it buildvm /usr/bin/autoport-launcher 0

Maintainer wants to add autoport as a cron job. To do this you may set the cron job on the docker host by running crontab -e and adding the line:

0 * * * * docker exec buildvm /usr/bin/autoport-launcher 0 2>&1 | logger -t autoport0

You may see a resume of port processes by opening the page:

http://localhost/autobuilds.html