there has been a 1024 byte discrepancy of the tar archive when pushed from a docker daemon to a docker-registry
$ sh repro.sh
or if you are testing a local build of docker
vbatts@jellyroll ~ (master *) $ sudo /home/vbatts/src/docker/docker/bundles/0.10.0-dev/dynbinary/docker-0.10.0-dev -d -g /home/docker -D 2>&1 | grep SUCH | |
[debug] volumes.go:182 SUCH VOLUMES: map[] | |
[debug] volumes.go:183 SUCH BIND: map["/repro.sh":{"/home/vbatts/sandbox/reproduction/20140501-rootVolPath/repro.sh" "/repro.sh" "ro"}] | |
[debug] volumes.go:215 SUCH SRC DIRECTORY: %!q(bool=false) | |
[debug] volumes.go:288 SUCH CREATE: "/home/docker/devicemapper/mnt/51f485a015ef5882875e5c9801d6a2b85a51ea590577fbcf5d28f7263a81942d/rootfs/repro.sh", %!q(bool=false) | |
[debug] volumes.go:182 SUCH VOLUMES: map[] | |
[debug] volumes.go:183 SUCH BIND: map[] | |
[debug] volumes.go:215 SUCH SRC DIRECTORY: %!q(bool=true) | |
[debug] volumes.go:288 SUCH CREATE: "/home/docker/devicemapper/mnt/96cced7026d92dd57b7067e2a49400f118b1e4fbbc93a868a1792f63e9024633/rootfs/repro.sh", %!q(bool=true) | |
[debug] volumes.go:251 SUCH FART: "/home/docker/devicemapper/mnt/96cced7026d92dd57b7067e2a49400f118b1e4fbbc93a868a1792f63e9024633/rootfs/repro.sh" |
FROM fedora:20 | |
RUN yum erase -y vim-minimal &&\ | |
yum groupinstall -y "development tools" && \ | |
yum install -y --setopt=override_install_langs=en --setopt=tsflags=nodocs \ | |
yum-utils \ | |
git \ | |
golang \ | |
mercurial \ | |
bzr \ |
FROM fedora:latest | |
RUN yum install -y attr golang git docker-registry | |
# this way we'll set something in a non-standard tar pax header for this image | |
RUN touch file && setfattr -n user.vbatts -v test ./file && getfattr -d ./file | |
# | |
RUN curl -kL https://github.com/dotcloud/docker/archive/v0.9.1.tar.gz | tar -zx | |
RUN mkdir -p /gopath/src/github.com/dotcloud && \ |
package main | |
import ( | |
"compress/gzip" | |
"flag" | |
"fmt" | |
"github.com/dotcloud/docker/image" | |
"github.com/dotcloud/docker/utils" | |
"io" | |
"io/ioutil" |
== For a static file-system (not an interactive registry daemon)
-- Overview For use-cases of serving docker images from a registry, that is to be read-only (pull or run, no push). It is necessary to make certain aspects of the index/registry API optional. This way the HTTP GET's made for pulling an image and layers, are provided by a basic file system server and no added logic.
Presently, there are a few custom headers that are expected of the registry, by the docker tool. If the headers are not present, then the pull of the image fails. The functionality that is using these headers ought to have some sane defaults if they are not present.
-- Example Using the attached server (though any http server like httpd or lighttpd would work too), to serve a directory. The directory fetched from http://people.gnome.org/~alexl/v1.tar.gz, looks like:
#!/usr/bin/env oo-ruby | |
=begin | |
Author: Vincent Batts <[email protected]> | |
Data: Fri Feb 28 15:42:09 EST 2014 | |
Description: Migration script for https://trello.com/c/q1ro2vDB/408-3-use-proxy-pass-for-virtual-hosts-plugin-instead-of-mod-rewrite | |
NOTE: this only applies to setups that are using the vhost plugin, namely OSE | |
=end | |
require "find" | |
require "json" |
require 'find' | |
require 'openssl' | |
ENTRUST_VERSION_OID = '1.2.840.113533.7.65.0' | |
def find_pem(d = '/etc') | |
Find.find(d) do |path| | |
next unless FileTest.file? path | |
if path.end_with? '.pem' |
#!/bin/sh | |
t_dir="$HOME/tmp" | |
mkdir -p ${t_dir} | |
pushd ${t_dir} | |
for url in \ | |
ftp://ftp.ruby-lang.org/pub/ruby/ruby-1.9.3-p194.tar.bz2 \ | |
http://openssl.org/source/openssl-1.0.1c.tar.gz |
require 'rubygems' | |
require 'sinatra/base' | |
require 'json' | |
class MyApp < Sinatra::Base | |
set :routes, @routes | |
get '/' do | |
p settings.routes | |
settings.routes.to_json |