I referred to the official Docker documentation: Create a base image and executed the following commands:
sudo debootstrap raring raring > /dev/null
sudo tar -C raring -c . | sudo docker import - raring
sudo docker run raring cat /etc/lsb-release
I got error messages for the last command and the image "raring" was empty, 0B.
container_linux.go:247: starting container process caused "exec: \"cat\": executable file not found in $PATH"
docker: Error response from daemon: oci runtime error:
container_linux.go:247: starting container process caused "exec: \"cat\": executable file not found in $PATH".
ERRO[0000] error getting events from daemon: net/http: request canceled
Since the image was empty, I changed the target from /dev/null to ./rootfs referring to this page: How can I make my own base image for Docker?
sudo debootstrap raring ./rootfs
But the deboostrap failed to fetch Release:
I: Retrieving InRelease
I: Failed to retrieve InRelease
I: Retrieving Release
E: Failed getting release file http://archive.ubuntu.com/ubuntu/dists/raring/Release
Using wget and my browser I found that "http://archive.ubuntu.com/ubuntu/dists/raring/Release" is a 404 page.
My Linux distribution is:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
And my docker version is:
Client:
Version: 17.04.0-ce
API version: 1.28
Go version: go1.7.5
Git commit: 4845c56
Built: Mon Apr 3 18:01:08 2017
OS/Arch: linux/amd64
Server:
Version: 17.04.0-ce
API version: 1.28 (minimum version 1.12)
Go version: go1.7.5
Git commit: 4845c56
Built: Mon Apr 3 18:01:08 2017
OS/Arch: linux/amd64
Experimental: false
How can I fix this problem or is there a new method that I can make my own base image? Any suggestion will be greatly appreciated. :)