root/build-tools/build-docker-images
Dan Voiculeasa c72f796e17 Fix incorrect entrypoint for updated image
Modify update-stx-image.sh to format the original CMD and ENTRYPOINT as
an array of tokens. For example ["token1", "token2"] or [""].
This way `docker commit --change` behaves as expected.

Tested on:
ORIG_CMD=/bin/bash
ORIG_ENTRYPOINT=

ORIG_CMD='/bin/bash -c'
ORIG_ENTRYPOINT=/bin/bash

Change-Id: If6fbe61adf15d9987dfade536a9c886ad1732580
Closes-Bug: 1906914
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
2020-12-07 13:09:10 +02:00
..
stx-centos Modify build-tools and stable-wheels for Ussuri upgrading 2020-06-23 18:29:31 +08:00
tag-management Update tag for rvmc image to stx.5.0-v1.0.0 2020-11-03 08:31:13 -05:00
README Update wheels and build tool 2019-03-24 21:03:21 -04:00
base-image-build-centos-dev.cfg Fix url's in base-image-build-centos-*.cfg 2020-08-21 14:25:18 -04:00
base-image-build-centos-stable.cfg Fix url's in base-image-build-centos-*.cfg 2020-08-21 14:25:18 -04:00
build-stx-base.sh Add --config-file argument for docker image build script 2020-07-28 13:49:47 +00:00
build-stx-images.sh Fix the bug introduced by adding proxy for image build scripts 2020-08-27 01:46:21 +08:00
docker-image-build-centos-dev.cfg Add --config-file argument for docker image build script 2020-07-28 13:49:47 +00:00
docker-image-build-centos-stable.cfg Add --config-file argument for docker image build script 2020-07-28 13:49:47 +00:00
internal-update-stx-image.sh Tool for incremental image updates 2019-06-03 20:36:16 +00:00
update-stx-image.sh Fix incorrect entrypoint for updated image 2020-12-07 13:09:10 +02:00

README

## Example commands for building StarlingX images

PRIVATE_REGISTRY_USERID=myuser
PRIVATE_REGISTRY=xxx.xxx.xxx.xxx:9001
VERSION=2018.11.13
OS=centos
OS_VERSION=7.5.1804
BUILD_STREAM=stable
HOST_PORT=8088

## Step 1: Build stx-centos
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} \
    --push \
    --repo stx-local-build,http://${HOSTNAME}:${HOST_PORT}/${MY_WORKSPACE}/std/rpmbuild/RPMS \
    --repo stx-mirror-distro,http://${HOSTNAME}:${HOST_PORT}/${MY_REPO}/cgcs-root/cgcs-${OS}-repo/Binary \
    --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