0

I want to create customized ubuntu iso with docker engine installed. I also want to load some docker images in it.

Docker Engine is installed.

I could save docker image using docker save command. But I couldn't load during installtion.

My sample kickstart file:

%post --nochroot

mkdir /target/usr/share/my-docker-imgs
cp -rf /cdrom/pool/extras/sample.tar /target/usr/share/my-docker-imgs
%end

%post
#server docker status // It shows docker is not running in log file. I also tried to start it hear.

docker load -i /usr/share/my-docker-imgs/sample.tar  //Log: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
%end

Also Tried in seed file:

d-i preseed/late_command string in-target docker load -i /usr/share/my-docker-imgs/sample.tar;

It through error code 127 during installation.

I referenced : custom ubuntu iso

0

I found docker is not started on post installation. Even /var/lib/docker directory is not yet created during post installation process.

Step 1: Refere this, to export the docker images. You have single file called docker-images.tar. Copy it over pool/extras directory.

Step 2: In the preseed/ks-myiso.cfg file,

%post --nochroot

cp -r /cdrom/pool/extras/docker-images.tar /target/usr/share/

%end

%post

mkdir -p /var/lib/docker
tar -xvf /usr/share/naanal_pkgs/docker_images.tar -C /var/lib/docker    

%end

Note: I faced some problem while I directly extract tar file from cdrom. If you don't find any issue on this you can directly untar docker-images.tar file without copying it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.