1
0
mirror of https://github.com/rancher/os.git synced 2025-08-02 07:24:28 +00:00
os/Makefile.docker
Darren Shepherd 75e1616f17 Merge pull request #477 from ibuildthecloud/stuff2
Update godeps and paths for docker
2015-08-13 01:39:34 -07:00

62 lines
1.5 KiB
Docker

include common.make
DOCKER_BINARY_URL := https://github.com/rancher/docker/releases/download/v1.8.1-ros/docker-1.8.1
KERNEL_URL := https://github.com/rancher/os-kernel/releases/download/Ubuntu-3.19.0-26.27/linux-3.19.8-ckt4-rancher-x86.tar.gz
DFS_IMAGE := rancher/docker:1.8.1
bin/rancheros:
mkdir -p $(dir $@)
godep go build -tags netgo -installsuffix netgo -ldflags "-X github.com/rancherio/os/config.VERSION $(VERSION) -linkmode external -extldflags -static" -o $@
strip --strip-all $@
pwd := $(shell pwd)
include scripts/build-common
assets/docker:
mkdir -p $(dir $@)
curl -L "$(DOCKER_BINARY_URL)" > $@
chmod +x $@
$(DIST)/artifacts/vmlinuz: $(BUILD)/kernel/
mkdir -p $(dir $@)
mv $(BUILD)/kernel/boot/vmlinuz* $@
$(BUILD)/kernel/:
mkdir -p $@ && curl -L "$(KERNEL_URL)" | tar -xzf - -C $@ --strip=0
$(BUILD)/images.tar: bin/rancheros
FORCE_PULL=$(FORCE_PULL) ./scripts/mk-images-tar.sh
$(DIST)/artifacts/initrd: bin/rancheros assets/docker $(BUILD)/kernel/ $(BUILD)/images.tar
mkdir -p $(dir $@)
DFS_IMAGE=$(DFS_IMAGE) ./scripts/mk-initrd.sh
$(DIST)/artifacts/rancheros.iso: $(DIST)/artifacts/initrd $(DIST)/artifacts/vmlinuz
./scripts/mk-rancheros-iso.sh
$(DIST)/artifacts/iso-checksums.txt: $(DIST)/artifacts/rancheros.iso
./scripts/mk-iso-checksums-txt.sh
version:
@echo $(VERSION)
build-all: \
bin/rancheros \
$(DIST)/artifacts/initrd \
$(DIST)/artifacts/vmlinuz \
$(DIST)/artifacts/rancheros.iso \
$(DIST)/artifacts/iso-checksums.txt
.PHONY: build-all version bin/rancheros