1
0
mirror of https://github.com/rancher/os.git synced 2025-07-12 22:27:59 +00:00
os/Makefile.docker
Ivan Mikushin 135949d894 rename KERNEL_URL to COMPILED_KERNEL_URL
to avoid confusion with KERNEL_URL in rancher/os-kernel
2015-09-10 11:47:30 +05:00

63 lines
1.4 KiB
Docker

include build.conf
FORCE_PULL := 0
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 "$(COMPILED_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: minimal
./scripts/mk-rancheros-iso.sh
$(DIST)/artifacts/iso-checksums.txt: $(DIST)/artifacts/rancheros.iso
./scripts/mk-iso-checksums-txt.sh
version:
@echo $(VERSION)
installer: minimal
docker build -t $(IMAGE_NAME):$(VERSION) .
build-all: minimal installer iso
minimal: $(DIST)/artifacts/initrd $(DIST)/artifacts/vmlinuz
iso: $(DIST)/artifacts/rancheros.iso $(DIST)/artifacts/iso-checksums.txt
integration-tests:
cd tests/integration && tox
.PHONY: build-all minimal iso installer version bin/rancheros integration-tests