Fewbytes / rubber-docker

A workshop on Linux containers: Rebuild Docker from Scratch
MIT License
2.99k stars 237 forks source link

Failed to build packer image #54

Open mfuxi opened 6 years ago

mfuxi commented 6 years ago

got two issues when tried to build the packer image on eu-central-1:

  1. amazon-ebs: Process: 4204 ExecStart=/usr/bin/docker daemon -H fd:// --storage-driver overlay (code=exited, status=125) the docker service fails to start with overlay storage driver
  2. amazon-ebs: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) amazon-ebs: E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? failed to apt-get update
ValFadeev commented 6 years ago
  1. Which base AMI are you building from? You may need to upgrade kernel to 4.x to support overlay.
  2. Likely caused by a previous failed/interrupted apt-get install. Trash the instance and try again (after (1) is fixed).
mfuxi commented 6 years ago

Tried both of these: us-east-1: ami-1162bc6c eu-central-1: ami-9a663471

Both had the issue with docker ovelay, but as you suggested I connected to the AMI without running the bootstrap.sh updated the kernel and the docker managed to restart successfully.

How can I update the AMI, or should I add update kernel section in bootstrap.sh?

ValFadeev commented 6 years ago

it may be necessary to either add something like this to bootstrap.sh, create a "base" image that only does the kernel upgrade and build this project from that, or find a community AMI with the suitable version.