No good luck to do “build-pkgs” either. 1. get stx-tools cd $HOME git clone https://git.starlingx.io/stx-tools cd stx-tools git checkout -b erich_base 1d2ecbb0be2 2. apply below patch nstcc1@nstcloudcc1:stx-tools$ git diff Dockerfile tb.sh Makefile diff --git a/Dockerfile b/Dockerfile index 87ef00b..dd730f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,9 @@ FROM centos:7.4.1708 # Proxy configuration -#ENV http_proxy "http://your.actual_http_proxy.com:your_port" -#ENV https_proxy "https://your.actual_https_proxy.com:your_port" -#ENV ftp_proxy "http://your.actual_ftp_proxy.com:your_port" +ENV http_proxy "http://child-prc.intel.com:913" +ENV https_proxy "http://child-prc.intel.com:913" +ENV ftp_proxy "ftp://child-prc.intel.com:913" # username you will docker exec into the container as. @@ -26,6 +26,8 @@ ARG MYUID=1000 ENV container=docker +RUN echo "proxy=$http_proxy" >> /etc/yum.conf && \ +echo -e "export http_proxy=$http_proxy\nexport https_proxy=$https_proxy\nexport ftp_proxy=$ftp_proxy" >> /root/.bashrc # Download required dependencies by mirror/build processes. # Notice there are 3 invocations to yum package manage. # 1) Enable EPEL repository. diff --git a/Makefile b/Makefile index c4ebff4..73f5f3a 100644 --- a/Makefile +++ b/Makefile @@ -20,6 +20,8 @@ all: docker build \ --build-arg MYUID=$(UID) \ --build-arg MYUNAME=$(MYUNAME) \ + --build-arg https_proxy=http://child-prc.intel.com:913 \ + --build-arg http_proxy=http://child-prc.intel.com:913 \ --ulimit core=0 \ --network host \ -t $(TC_CONTAINER_TAG) \ diff --git a/tb.sh b/tb.sh index e0508dd..9530efd 100755 --- a/tb.sh +++ b/tb.sh @@ -38,11 +38,14 @@ function run_container { docker run -it --rm \ --name ${TC_CONTAINER_NAME} \ --detach \ + -v /etc/localtime:/etc/localtime:ro \ -v ${LOCALDISK}:/${GUEST_LOCALDISK} \ -v ${HOST_MIRROR_DIR}:/import/mirrors:ro \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ -v ~/.ssh:/mySSH:ro \ -e "container=docker" \ + --env https_proxy=http://child-prc.intel.com:913 \ + --env http_proxy=http://child-prc.intel.com:913 \ -e MYUNAME=${MYUNAME} \ --privileged=true \ --security-opt seccomp=unconfined \ 3. build docker image make all 4. run docker image bash tb.sh run 5. execute into docker container bash tb.sh exec 6. [nstcc1@d8ae703a2a91 /]$ eval $(ssh-agent) Agent pid 15524 [nstcc1@d8ae703a2a91 /]$ ssh-add Identity added: /home/nstcc1/.ssh/id_rsa (/home/nstcc1/.ssh/id_rsa) [nstcc1@d8ae703a2a91 /]$ cd $MY_REPO_ROOT_DIR [nstcc1@d8ae703a2a91 starlingx]$ repo init -u https://git.starlingx.io/stx-manifest -m default.xml [nstcc1@d8ae703a2a91 starlingx]$ repo sync -j4 [nstcc1@d8ae703a2a91 starlingx]$ ln -s /import/mirrors/CentOS/stx-r1/CentOS/pike/downloads/ $MY_REPO/stx/ [nstcc1@d8ae703a2a91 starlingx]$ populate_downloads.sh /import/mirrors/CentOS/stx-r1/CentOS/pike/ 7. nstcc1@nstcloudcc1:~$ mkdir -p $HOME/starlingx/mirror/CentOS/tis-installer nstcc1@nstcloudcc1:~$ cp $HOME/starlingx/mirror/CentOS/stx-r1/CentOS/pike/Binary/images/pxeboot/initrd.img $HOME/starlingx/mirror/CentOS/tis-installer/initrd.img-stx-0.2 nstcc1@nstcloudcc1:~$ cp $HOME/starlingx/mirror/CentOS/stx-r1/CentOS/pike/Binary/images/pxeboot/vmlinuz $HOME/starlingx/mirror/CentOS/tis-installer/vmlinuz-stx-0.2 nstcc1@nstcloudcc1:~$ cp $HOME/starlingx/mirror/CentOS/stx-r1/CentOS/pike/Binary/LiveOS/squashfs.img $HOME/starlingx/mirror/CentOS/tis-installer/squashfs.img-stx-0.2 8. [nstcc1@d8ae703a2a91 starlingx]$ generate-cgcs-centos-repo.sh /import/mirrors/CentOS/stx-r1/CentOS/pike/ 9. [nstcc1@d8ae703a2a91 starlingx]$ build-pkgs Then, hit lots of error, the log is build-pkgs.log 21:10:47 failure: repodata/repomd.xml from TisCentos7Distro: [Errno 256] No more mirrors to try. 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 http://127.0.0.1:8088/localdisk/designer/nstcc1/starlingx/cgcs-root/cgcs-centos-repo/Binary/repodata/repomd.xml: [Errno 14] HTTP Error 503 - Service Unavailable 21:10:47 21:10:47 End build on 'b0': /localdisk/loadbuild/nstcc1/starlingx/std/rpmbuild/SRPMS/mariadb-10.1.28-1.el7.tis.15.src.rpm 21:10:47 Error building mariadb-10.1.28-1.el7.tis.15.src.rpm on 'b0'.