1

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. :)

pikatao
  • 344
  • 6
  • 12
  • 1
    I'm not sure why they chose `raring` (13.04) (a non-lts release) -- try with xenial (16.04) instead (unless there's a compelling reason to use an *old* ubuntu release). – anthony sottile Jul 11 '17 at 04:45
  • This is more of a sidetrack from your original issue, but I think it is worth mentioning. Any time that you run into an issue with the docs, I would recommend using the "Request docs changes" feature. That link appears on the right sidebar and footer of every docs page. That will take you to github, where you will be able to open an issue that has a template with the reference to the correct file. You could also use the "Edit this page" ling if you wanted to propose changes to the dock that would fix the issue. – programmerq Jul 11 '17 at 11:20
  • 1
    fwiw, I've proposed a fix to their docs: https://github.com/docker/docker.github.io/pull/3859 (I didn't do it last night because I know how long `debootstrap` takes and was not willing to test it before sleeping :D) – anthony sottile Jul 11 '17 at 16:27
  • @Anthony Sottile Many thank for your help. Your fix works well. :D – pikatao Jul 12 '17 at 04:46
  • @programmerq Got it. I will open a new issue when running into problems with a doc. Thank you for your patience to a newbie. – pikatao Jul 12 '17 at 04:48

1 Answers1

1

The documentation is out of date -- it's listing an old non-lts release of ubuntu (raring, 13.04) -- I've submitted a pull request to update it to a more-recent LTS release (xenial, 16.04): https://github.com/docker/docker.github.io/pull/3859

The following commands work great though:

sudo debootstrap xenial xenial > /dev/null    
sudo tar -C xenial -c . | sudo docker import - xenial
sudo docker run xenial cat /etc/lsb-release
anthony sottile
  • 61,815
  • 15
  • 148
  • 207