diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 07eb65fb..840f7479 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -331,8 +331,8 @@ }, { "ImportPath": "github.com/rancher/docker-from-scratch", - "Comment": "v1.7.1-2-12-gf2f4b5e", - "Rev": "f2f4b5e9b789016fbc4578814a1f4bd0f8c3ba80" + "Comment": "1.8.0-rc3", + "Rev": "61019634b705c0d3ac2aa115baf9568bf55393c2" }, { "ImportPath": "github.com/rancher/netconf", diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/.dockerignore b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/.dockerignore index 222a0284..47463bce 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/.dockerignore +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/.dockerignore @@ -1,2 +1,2 @@ -base-image/build -base-image/cache +base-image +assets diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/build.sh b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/build.sh index d0176ecb..631e788f 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/build.sh +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/build.sh @@ -1,4 +1,6 @@ #!/bin/bash +rm -rf $(dirname $0)/build + export NO_TEST=true exec $(dirname $0)/scripts/ci diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scratch.go b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scratch.go index 281ff81d..ea686426 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scratch.go +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scratch.go @@ -421,6 +421,21 @@ func prepare(config *Config, docker string, args ...string) error { return err } + if err := setupBin(config, docker); err != nil { + return err + } + + return nil +} + +func setupBin(config *Config, docker string) error { + if _, err := os.Stat(docker); os.IsNotExist(err) { + dist := docker + ".dist" + if _, err := os.Stat(dist); err == nil { + return os.Symlink(dist, docker) + } + } + return nil } diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/Dockerfile.build b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/Dockerfile.build index e5903798..d61c92d5 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/Dockerfile.build +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/Dockerfile.build @@ -6,3 +6,7 @@ RUN go get github.com/tools/godep ENV GOPATH /go/src/github.com/rancher/docker-from-scratch/Godeps/_workspace:/go WORKDIR /go/src/github.com/rancher/docker-from-scratch + +COPY . . + +RUN godep go build -ldflags "-linkmode external -extldflags -static" -o build/dockerlaunch ./main diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/build b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/build index 9cb1805a..92bc3821 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/build +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/build @@ -7,13 +7,16 @@ mkdir -p build if [ ! -e build/ca-certificates.crt ]; then ID=$(docker run -d ubuntu sh -c "apt-get update && apt-get install -y ca-certificates") - docker logs -f $ID & - docker wait $ID - docker cp $ID:/etc/ssl/certs/ca-certificates.crt build/ - docker rm -vf $ID || true + docker logs -f ${ID} & + docker wait ${ID} + docker cp ${ID}:/etc/ssl/certs/ca-certificates.crt build/ + docker rm -vf ${ID} || true fi -mkdir -p build docker build -f ./scripts/Dockerfile.build -t dockerscratch-build . -docker run --rm -v `pwd`:/go/src/github.com/rancher/docker-from-scratch dockerscratch-build godep go build -ldflags "-linkmode external -extldflags -static" -o build/dockerlaunch ./main +ID=$(docker run -d dockerscratch-build strip --strip-all build/dockerlaunch) +trap "docker rm -fv ${ID}" EXIT +docker logs -f ${ID} & +docker wait ${ID} +docker cp ${ID}:/go/src/github.com/rancher/docker-from-scratch/build/dockerlaunch ./build/ diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/download b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/download index bd2ca340..d591f93e 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/download +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/download @@ -43,11 +43,11 @@ mkdir -p ${BUILD} if [ -e base-image/dist/base-files.tar.gz ]; then cp base-image/dist/base-files.tar.gz build/ else - download f9e561b91bfdf6c4641e2bec8a69c9d4577b2ba2 https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.1.0/base-files.tar.gz + download 920a7e413c34bf94928c3e6c8aad1dcca9bd0128 https://github.com/rancher/docker-from-scratch/releases/download/bin-v0.2.0/base-files.tar.gz cp assets/base-files.tar.gz build fi -download 1c5ed280185a17f1595084206e10c85599f15299 https://test.docker.com/builds/Linux/x86_64/docker-1.8.0-rc2 +download 342880a7806447539e959df2119580bd56852b24 https://test.docker.com/builds/Linux/x86_64/docker-1.8.0-rc3 cp assets/docker-* build/docker chmod +x build/docker diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/package b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/package index 7ebe7c39..be1865e3 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/package +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/package @@ -5,7 +5,6 @@ cd $(dirname $0)/.. . ./scripts/common -docker run --rm -v `pwd`:/go/src/github.com/rancher/docker-from-scratch dockerscratch-build strip --strip-all build/dockerlaunch docker build -t $IMAGE -f Dockerfile . echo Built $IMAGE diff --git a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/version b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/version index e0645eb7..1298ad0a 100644 --- a/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/version +++ b/Godeps/_workspace/src/github.com/rancher/docker-from-scratch/scripts/version @@ -1 +1 @@ -1.8.0-rc2 +1.8.0-rc3 diff --git a/Makefile.docker b/Makefile.docker index ae56b01e..8694dea5 100644 --- a/Makefile.docker +++ b/Makefile.docker @@ -58,4 +58,4 @@ build-all: \ $(DIST)/artifacts/iso-checksums.txt -.PHONY: build-all version +.PHONY: build-all version bin/rancheros diff --git a/os-config.yml b/os-config.yml index 9e881c16..7b5753a3 100644 --- a/os-config.yml +++ b/os-config.yml @@ -132,7 +132,7 @@ rancher: - /usr/bin/ros:/usr/bin/system-docker:ro - /usr/bin/ros:/usr/sbin/wait-for-docker:ro - /usr/bin/ros:/usr/bin/dockerlaunch:ro - - /usr/bin/docker:/usr/bin/docker:ro + - /usr/bin/docker:/usr/bin/docker.dist:ro console: image: rancher/os-console:v0.4.0-dev labels: @@ -157,7 +157,6 @@ rancher: read_only: true volumes: - /var/lib/docker:/var/lib/docker - - /var/lib/system-docker:/var/lib/system-docker network: image: rancher/os-network:v0.4.0-dev labels: @@ -232,8 +231,19 @@ rancher: - /etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt.rancher - /lib/modules:/lib/modules - /lib/firmware:/lib/firmware + - /run:/run - /var/run:/var/run - /var/log:/var/log + udev-cold: + image: rancher/os-udev:v0.4.0-dev + labels: + io.rancher.os.scope: system + io.rancher.os.before: udev + net: host + uts: host + privileged: true + volumes_from: + - system-volumes udev: image: rancher/os-udev:v0.4.0-dev environment: