-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 921 Bytes
/
Makefile
File metadata and controls
29 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CODENAME ?= bullseye
DEV_REGISTRY ?= registry.drycc.cc
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
IMAGE = "${DRYCC_REGISTRY}"/drycc/base:"${CODENAME}"-"$(shell dpkg --print-architecture)"
WORK_DIR = /workspace/"${CODENAME}"
SHELLCHECK_PREFIX := docker run --rm -v ${CURDIR}:/workdir -w /workdir ${DRYCC_REGISTRY}/drycc/go-dev shellcheck
SHELL_SCRIPTS = $(shell find . -name '*.sh') $(wildcard debootstrap/*/rootfs/*/bin/*) $(wildcard debootstrap/*/rootfs/*/sbin/*)
SHELL=/bin/bash -o pipefail
clean:
@rm -rf "${WORK_DIR}" "${WORK_DIR}".tar.gz
mkimage:
./scripts/mkimage.sh minbase "${CODENAME}"
build: mkimage
@docker build . \
--tag ${IMAGE} \
--build-arg BASE_LAYER=$(shell docker import ${WORK_DIR}.tar.gz) \
--file Dockerfile
publish: test-style build
@docker push "${IMAGE}"
@echo -e "\\033[32m---> Build image $codename complete, enjoy life...\\033[0m"
test-style:
${SHELLCHECK_PREFIX} $(SHELL_SCRIPTS)