Skip to content

Build in the cloud using the Docker image

Pete Fotheringham edited this page Jan 8, 2025 · 3 revisions
This is the script I used to set up a 'virgin' cloud server

Docker-setup.sh

#!/bin/sh

mkdir -p \
/srv/src \
/srv/local_manifests \
/srv/userscripts \
/srv/zips \
/srv/logs \
/srv/ccache \
/srv/keys

curl -fsSL https://get.docker.com -o get-docker.sh

sh get-docker.sh

apt-get update
apt-get upgrade

apt install git unzip sshpass
This is the script I used to set up the server and run a docker build
# Information from <https://github.com/lineageos4microg/docker-lineage-cicd

# 1. Get the 'Install Docker' script from  get.docker.com <https://github.com/docker/docker-install>
curl -fsSL https://get.docker.com -o get-docker.sh

# 2. Run the 'Install Docker' script
sh get-docker.sh

# 3. Get the l4microg docker image
sudo docker pull lineageos4microg/docker-lineage-cicd

# 4. Get the manifests from the `l4microg` branch of my repo
git config --global user.email "petefoth@e.email"
git config --global user.name "Pete Fotheringham"


sudo git clone -b l4microg https://git.coop/phone-custom-roms/manifests.git /srv/l/manifests

cd /srv/l/manifests
# check we've got the right files
ls -l

  total 24
  -rw-r--r-- 1 root root 3588 Feb  6 10:39 README.md
  -rw-r--r-- 1 root root  248 Feb  6 10:41 l4microg-prebuiltAPKs.xml
  drwxr-xr-x 2 root root 4096 Feb  6 10:41 one-offs
  -rw-r--r-- 1 root root  818 Feb  6 10:41 sony-lilac-manifest.xml
  -rw-r--r-- 1 root root 1190 Feb  6 10:41 sony-suzuran-manifest.xml
  -rw-r--r-- 1 root root  603 Feb  6 10:41 sony-z3c-manifest.xml

# 4. Open a `screen` session to work in
screen -S lineage-build-l4m

# We're now inside the `docker-build..` session

# in screen session
# 5. note the start time
date

# 6. run `docker`

sudo docker run \
  -e "BRANCH_NAME=lineage-17.1" \
  -e "DEVICE_LIST=z3c,suzuran,lilac" \
  -e "SIGNATURE_SPOOFING=restricted" \
  -e "INCLUDE_PROPRIETARY=false" \
  -e "CCACHE_SIZE=200G" \
  -v "/srv/l/src:/srv/src" \
  -v "/srv/l/zips:/srv/zips" \
  -v "/srv/l/logs:/srv/logs" \
  -v "/srv/l/cache:/srv/ccache" \
  -v "/srv/l/keys:/srv/keys" \
  -v "/srv/l/manifests:/srv/local_manifests" \
  lineageos4microg/docker-lineage-cicd

Clone this wiki locally