Fixing Loading of docker image during image-build
>> docker load of docker image 'configurator-docker' was failing during image-build process. >> issue occured after docker-engine package new release version 1.12.3. Restricting the docker-engine package to working version 1.12.2 >> Also fixed stale docker process existing on Host even after diskimage-builder script was finished. docker process will start/stop in chroot of image being built. Change-Id: I3b2fffef28357cf83b29b1d255c14cb6df315d4e Closes-Bug: 1638629
This commit is contained in:
parent
dfef8cae60
commit
e830a98b93
@ -1,5 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
# install docker engine
|
||||
wget -qO- https://get.docker.com/ | bash
|
||||
# install docker-engine
|
||||
#wget -qO- https://get.docker.com/ | bash
|
||||
|
||||
|
||||
# following are the steps from docs.docker.com for installing docker-engine
|
||||
apt-get -y --force-yes install apt-transport-https ca-certificates
|
||||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
|
||||
echo "deb https://apt.dockerproject.org/repo ubuntu-$DIB_RELEASE main" >> /etc/apt/sources.list.d/docker.list
|
||||
apt-get update
|
||||
apt-get -y --force-yes install linux-image-extra-$(uname -r) linux-image-extra-virtual
|
||||
|
||||
# install specific version of docker-engine.
|
||||
# issue noticed with latest version (1.12.3) of docker-engine during 'docker load'
|
||||
# TODO: fix issue with latest version
|
||||
apt-get -y --force-yes install docker-engine=1.12.2-0~${DIB_RELEASE}
|
||||
|
@ -6,3 +6,6 @@ docker daemon --raw-logs &
|
||||
|
||||
# sleep for docker to comeup
|
||||
sleep 10
|
||||
|
||||
# save docker pid to a temp file
|
||||
echo $! > /tmp/docker_pid_dib
|
||||
|
10
gbpservice/contrib/nfp/tools/image_builder/elements/docker-opt/post-install.d/06-stop-docker
Normal file → Executable file
10
gbpservice/contrib/nfp/tools/image_builder/elements/docker-opt/post-install.d/06-stop-docker
Normal file → Executable file
@ -1,4 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# on the safer side, stop the docker
|
||||
service docker stop
|
||||
set -eux
|
||||
|
||||
# get the docker pid, started by dib element
|
||||
DOCKER_PS_DIB=`cat /tmp/docker_pid_dib`
|
||||
|
||||
# kill the docker process
|
||||
kill -9 $DOCKER_PS_DIB
|
||||
rm -f /tmp/docker_pid_dib
|
||||
|
Loading…
Reference in New Issue
Block a user