root/build-tools/build-docker-images
2024-09-05 16:22:43 +00:00
..
loci/patches Remove CentOS/OpenSUSE build support 2024-08-06 13:43:50 +00:00
stx-debian stx-debian: remove python 2.x NSS module 2024-06-26 13:26:48 -04:00
tag-management Merge "Update tags for ptp-notification app maintenance" 2024-09-05 16:22:43 +00:00
build-stx-base.sh Remove CentOS/OpenSUSE build support 2024-08-06 13:43:50 +00:00
build-stx-images.sh build-docker-images: additional error handling 2023-09-08 12:58:52 -04:00
docker_reg_utils.sh docker-images: better registry error handling 2023-05-05 17:03:30 -04:00
FIXME docker-images: add Loci patches 2022-09-14 10:56:06 -04:00
internal-update-stx-image.sh Tool for incremental image updates 2019-06-03 20:36:16 +00:00
README Remove CentOS/OpenSUSE build support 2024-08-06 13:43:50 +00:00
update-stx-image.sh Remove CentOS/OpenSUSE build support 2024-08-06 13:43:50 +00:00

## Example commands for building StarlingX images

PRIVATE_REGISTRY_USERID=myuser
PRIVATE_REGISTRY=xxx.xxx.xxx.xxx:9001
VERSION=2018.11.13
OS=debian
OS_VERSION=7.5.1804
BUILD_STREAM=stable
HOST_PORT=8088
PUBLISH_URL=https://mirror.starlingx.windriver.com/mirror/starlingx/master/${OS}/monolithic/latest_build/

## Step 1: Build stx-debian
time $MY_REPO/build-tools/build-docker-images/build-stx-base.sh \
    --os ${OS} \
    --os-version ${OS_VERSION} \
    --version ${VERSION} \
    --user ${PRIVATE_REGISTRY_USERID} \
    --registry ${PRIVATE_REGISTRY} \
    --repo 'deb [trusted=yes check-valid-until=0] $PUBLISH_URL/inputs/packages ./'
    --repo 'deb [trusted=yes check-valid-until=0] $PUBLISH_URL/outputs/std/packages ./'
    --push \
    --clean


## Step 2: Build wheels (output as tarball)
time $MY_REPO/build-tools/build-wheels/build-wheel-tarball.sh \
    --os ${OS} \
    --os-version ${OS_VERSION} \
    --stream ${BUILD_STREAM}

## Step 3: Build images
time $MY_REPO/build-tools/build-docker-images/build-stx-images.sh \
    --os ${OS} \
    --version ${VERSION} \
    --stream ${BUILD_STREAM} \
    --base ${PRIVATE_REGISTRY}/${PRIVATE_REGISTRY_USERID}/stx-${OS}:${VERSION} \
    --wheels http://${HOSTNAME}:${HOST_PORT}/${MY_WORKSPACE}/std/build-wheels-${OS}-${BUILD_STREAM}/stx-${OS}-${BUILD_STREAM}-wheels.tar \
    --user ${PRIVATE_REGISTRY_USERID} \
    --registry ${PRIVATE_REGISTRY} \
    --push --latest \
    --clean


## Note: Verify that lighttpd is not bound to "localhost"
vi /etc/lighttpd/lighttpd.conf
# server.bind = "localhost"
systemctl restart lighttpd

## Note: You may need to add an iptables rule to allow the docker
## containers to access the http server on your host. For example:
iptables -I INPUT 6 -i docker0 -p tcp --dport ${HOST_PORT} -m state --state NEW,ESTABLISHED -j ACCEPT