mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-21 03:48:45 +00:00
To simplify maintaince, create dockerfiles based on templates. This way when golang version is updated it will be done in one place versions.txt. This also allow to allways intall the same version of golang in any dockerfile. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com>
21 lines
634 B
Makefile
21 lines
634 B
Makefile
# Copyright (c) 2017 Intel Corporation
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
#
|
|
MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
## Default destdir is one level up where is rootfs.sh script
|
|
DESTDIR ?= "$(realpath $(MK_DIR)/../)/$(ROOTFS_BASE_NAME)"
|
|
all:
|
|
ifndef ROOTFS_BASE_NAME
|
|
$(error ROOTFS_BASE_NAME is not set, use $ make ROOTFS_BASE_NAME=new_supported_os)
|
|
endif
|
|
mkdir -p $(DESTDIR)
|
|
cp "$(MK_DIR)/rootfs_lib_template.sh" "$(DESTDIR)/rootfs_lib.sh"
|
|
cp "$(MK_DIR)/config_template.sh" "$(DESTDIR)/config.sh"
|
|
sed \
|
|
-e "s|@distro@|$(ROOTFS_BASE_NAME)|g" \
|
|
Dockerfile.template > $(DESTDIR)/Dockerfile.in
|
|
|
|
|