1
0
mirror of https://github.com/rancher/os.git synced 2025-06-24 05:57:03 +00:00
os/Makefile.docker

62 lines
1.5 KiB
Docker
Raw Normal View History

include common.make
2015-08-10 14:28:43 +00:00
DOCKER_BINARY_URL := https://github.com/rancher/docker/releases/download/v1.8.0-rc3-ros/docker-1.8.0-rc3
2015-08-07 14:34:05 +00:00
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
2015-08-10 14:28:43 +00:00
DFS_IMAGE := rancher/docker:1.8.0-rc3
2015-08-06 07:04:46 +00:00
bin/rancheros:
2015-08-07 14:34:05 +00:00
mkdir -p $(dir $@)
2015-08-06 07:04:46 +00:00
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
2015-08-06 07:04:46 +00:00
assets/docker:
2015-08-07 14:34:05 +00:00
mkdir -p $(dir $@)
2015-08-06 07:04:46 +00:00
curl -L "$(DOCKER_BINARY_URL)" > $@
chmod +x $@
2015-08-06 07:04:46 +00:00
2015-08-07 14:34:05 +00:00
$(DIST)/artifacts/vmlinuz: $(BUILD)/kernel/
mkdir -p $(dir $@)
mv $(BUILD)/kernel/boot/vmlinuz* $@
2015-08-07 14:34:05 +00:00
$(BUILD)/kernel/:
mkdir -p $@ && curl -L "$(KERNEL_URL)" | tar -xzf - -C $@ --strip=0
2015-08-07 14:34:05 +00:00
$(BUILD)/images.tar: bin/rancheros
FORCE_PULL=$(FORCE_PULL) ./scripts/mk-images-tar.sh
2015-08-06 07:04:46 +00:00
2015-08-07 14:34:05 +00:00
$(DIST)/artifacts/initrd: bin/rancheros assets/docker $(BUILD)/kernel/ $(BUILD)/images.tar
mkdir -p $(dir $@)
DFS_IMAGE=$(DFS_IMAGE) ./scripts/mk-initrd.sh
2015-08-06 07:04:46 +00:00
2015-08-07 14:34:05 +00:00
$(DIST)/artifacts/rancheros.iso: $(DIST)/artifacts/initrd $(DIST)/artifacts/vmlinuz
./scripts/mk-rancheros-iso.sh
2015-08-06 07:04:46 +00:00
$(DIST)/artifacts/iso-checksums.txt: $(DIST)/artifacts/rancheros.iso
./scripts/mk-iso-checksums-txt.sh
2015-08-06 07:04:46 +00:00
version:
@echo $(VERSION)
2015-08-06 07:04:46 +00:00
build-all: \
bin/rancheros \
$(DIST)/artifacts/initrd \
$(DIST)/artifacts/vmlinuz \
$(DIST)/artifacts/rancheros.iso \
$(DIST)/artifacts/iso-checksums.txt
2015-08-07 14:34:05 +00:00
.PHONY: build-all version