Skip to content

Instantly share code, notes, and snippets.

@saintaardvark
Created October 27, 2015 17:28
Show Gist options
  • Save saintaardvark/7a496fc694c627acf824 to your computer and use it in GitHub Desktop.
Save saintaardvark/7a496fc694c627acf824 to your computer and use it in GitHub Desktop.
FROM ubuntu:trusty
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq apt-transport-https curl
# chef-stable.list can be found here: https://gist.github.com/saintaardvark/ce7700054e573fe9bd14
COPY assets/chef-stable.list /etc/apt/sources.list.d/chef-stable.list
RUN /bin/bash -c '/usr/bin/curl https://packagecloud.io/gpg.key | /usr/bin/apt-key add -'
# This command comes from the apt cookbook for Chef: https://github.com/chef-cookbooks/apt/blob/master/providers/repository.rb#L196-L202
RUN /bin/bash -c "apt-get update -o Dir::Etc::sourcelist='sources.list.d/chef-stable.list' -o Dir::Etc::sourceparts='-' -o APT::Get::L\
ist-Cleanup='0'"
RUN apt-get update
@saintaardvark
Copy link
Author

If I comment out the last line ("RUN apt-get update"), then run a shell in the resulting Docker container, I can see some interesting files in /var/lib/apt/lists/partial:

# cat packagecloud.io_chef_stable_ubuntu_dists_lucid_main_binary-amd64_Packages
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>InvalidRange</Code><Message>The requested range is not satisfiable</Message><RangeRequested>bytes=32385-</RangeRequested>\
<ActualObjectSize>32385</ActualObjectSize><RequestId>B6B5652168DD7DC5</RequestId><HostId>aSdvoykys7j0ouAWthsR0a3f8XefvRBKQnu31vWESeUt/\
UUdFrv+Ukg75Al6iEWuolpeUA0iUN0=</HostId></Error>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment