1
0
mirror of https://github.com/rancher/os.git synced 2025-07-07 11:58:38 +00:00

Merge pull request #477 from ibuildthecloud/stuff2

Update godeps and paths for docker
This commit is contained in:
Darren Shepherd 2015-08-13 01:39:34 -07:00
commit 75e1616f17
11 changed files with 50 additions and 17 deletions

4
Godeps/Godeps.json generated
View File

@ -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",

View File

@ -1,2 +1,2 @@
base-image/build
base-image/cache
base-image
assets

View File

@ -1,4 +1,6 @@
#!/bin/bash
rm -rf $(dirname $0)/build
export NO_TEST=true
exec $(dirname $0)/scripts/ci

View File

@ -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
}

View File

@ -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

View File

@ -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/

View File

@ -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

View File

@ -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

View File

@ -1 +1 @@
1.8.0-rc2
1.8.0-rc3

View File

@ -58,4 +58,4 @@ build-all: \
$(DIST)/artifacts/iso-checksums.txt
.PHONY: build-all version
.PHONY: build-all version bin/rancheros

View File

@ -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: