File tree Expand file tree Collapse file tree 3 files changed +28
-8
lines changed
Expand file tree Collapse file tree 3 files changed +28
-8
lines changed Original file line number Diff line number Diff line change 11BUILD_DIR =$(shell pwd) /build
22CODE_DIR =$(shell pwd) /iso
33VERSION =1.0.0
4+ GITTAG =$(shell git rev-parse --short HEAD)
5+ DATE =$(shell date +"% d% m% Y% H% M% S")
6+ ISO_NAME =minishift-b2d
7+ OSRELEASE_FILE =os-release
8+ OSRELEASE_TEMPLATE =os-release.template
49
5- default : b2d_iso
10+ default : iso
611
712.PHONY : init
813init :
@@ -11,13 +16,12 @@ init:
1116.PHONY : clean
1217clean :
1318 rm -rf $(BUILD_DIR )
19+ rm -f $(CODE_DIR ) /$(OSRELEASE_FILE )
1420
15- .PHONY : b2d_iso
16- b2d_iso : ISO_NAME=minishift-b2d
17- b2d_iso : iso_creation
18-
19- .PHONY : iso_creation
20- iso_creation : init
21+ .PHONY : iso
22+ iso : init
23+ # Creating minishift-b2d ISO specific /etc/os-release file.
24+ isoname=' $(ISO_NAME)' version=' $(VERSION)' build_id=' $(GITTAG)-$(DATE)' envsubst < $(CODE_DIR ) /$(OSRELEASE_TEMPLATE ) > $(CODE_DIR ) /$(OSRELEASE_FILE )
2125 cd $(CODE_DIR ) ; bash build.sh
2226
2327.PHONY : get_gh-release
@@ -27,7 +31,7 @@ get_gh-release: init
2731 rm -fr $(BUILD_DIR ) /gh-release_2.2.1_linux_x86_64.tgz
2832
2933.PHONY : release
30- release : b2d_iso get_gh-release
34+ release : iso get_gh-release
3135 rm -rf release && mkdir -p release
3236 cp $(BUILD_DIR ) /minishift-b2d.iso release/
3337 $(BUILD_DIR ) /gh-release checksums sha256
Original file line number Diff line number Diff line change @@ -20,6 +20,13 @@ FROM boot2docker/boot2docker:1.12.3
2020RUN echo "1.12.3" > $ROOTFS/etc/version
2121ENV DOCKER_SHA a3bb88649bcc47775c29dab7d95709f4dda04d0e
2222
23+ # Removing the code that creates the /etc/os-release file.
24+ # Refer: https://github.com/boot2docker/boot2docker/blob/master/rootfs/make_iso.sh#L20-L34
25+ RUN sed -i '/^b2dVersion/,/^EOOS/d' /make_iso.sh
26+
27+ # Add the /etc/os-release file
28+ ADD os-release $ROOTFS/etc
29+
2330# Add other dependencies here to $ROOTFS/
2431ADD nsenter $ROOTFS/usr/bin/
2532ADD socat $ROOTFS/usr/bin
Original file line number Diff line number Diff line change 1+ NAME=${isoname}
2+ VERSION=${version}
3+ BUILD_ID=${build_id}
4+ ID=boot2docker
5+ ID_LIKE=tcl
6+ PRETTY_NAME="Minishift Boot2Docker ISO Version: ${version}"
7+ ANSI_COLOR="1;34"
8+ HOME_URL="https://github.com/minishift/minishift-b2d-iso"
9+ BUG_REPORT_URL="https://github.com/minishift/minishift-b2d-iso/issues"
You can’t perform that action at this time.
0 commit comments