-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from bargees/update-docker
Make another Barge OS with the latest docker binary
- Loading branch information
Showing
6 changed files
with
431 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
.gitignore | ||
.vagrant/ | ||
|
||
contrib/ | ||
docs/ | ||
output/ | ||
LICENSE | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
**/.DS_Store | ||
|
||
.vagrant/ | ||
|
||
Makefile | ||
README.md | ||
Vagrantfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
FROM ailispaw/ubuntu-essential:14.04-nodoc | ||
|
||
RUN apt-get -q update && \ | ||
apt-get -q -y install --no-install-recommends cpio xz-utils syslinux xorriso && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV SRCDIR /usr/src | ||
WORKDIR ${SRCDIR} | ||
|
||
RUN mkdir -p root | ||
ADD rootfs.tar.xz ${SRCDIR}/root/ | ||
|
||
COPY docker ${SRCDIR}/root/etc/init.d/docker | ||
COPY docker.tgz /tmp | ||
RUN cd /tmp && \ | ||
tar -zxf docker.tgz -C ${SRCDIR}/root/usr/bin --strip-components=1 | ||
|
||
COPY docker.bash-completion ${SRCDIR}/root/usr/share/bash-completion/completions/docker | ||
|
||
ENV ISO /iso | ||
|
||
RUN mkdir -p ${ISO}/boot && \ | ||
cd root && find | cpio -H newc -o | xz -9 -C crc32 -c > ${ISO}/boot/initrd | ||
|
||
COPY bzImage ${ISO}/boot/ | ||
|
||
RUN mkdir -p ${ISO}/boot/isolinux && \ | ||
cp /usr/lib/syslinux/isolinux.bin ${ISO}/boot/isolinux/ && \ | ||
cp /usr/lib/syslinux/linux.c32 ${ISO}/boot/isolinux/ldlinux.c32 | ||
|
||
COPY isolinux.cfg ${ISO}/boot/isolinux/ | ||
|
||
# Copied from boot2docker, thanks. | ||
RUN cd ${ISO} && \ | ||
xorriso \ | ||
-publisher "A.I. <ailis@paw.zone>" \ | ||
-as mkisofs \ | ||
-l -J -R -V "BARGE" \ | ||
-no-emul-boot -boot-load-size 4 -boot-info-table \ | ||
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat \ | ||
-isohybrid-mbr /usr/lib/syslinux/isohdpfx.bin \ | ||
-no-pad -o /barge-x.iso $(pwd) | ||
|
||
CMD ["cat", "/barge-x.iso"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
BARGE_VERSION := 2.9.0 | ||
DOCKER_CHANNEL := stable | ||
DOCKER_VERSION := 18.03.1-ce | ||
|
||
ISO_NAME := barge-x.iso | ||
|
||
EXTERNAL_DEPENDENCIES := bzImage rootfs.tar.xz isolinux.cfg docker.tgz docker.bash-completion | ||
|
||
iso: $(ISO_NAME) | ||
|
||
$(ISO_NAME): Dockerfile docker $(EXTERNAL_DEPENDENCIES) | ||
docker build -t barge-x . | ||
docker run --rm barge-x > $@ | ||
|
||
bzImage rootfs.tar.xz: | ||
curl -L https://github.com/bargees/barge-os/releases/download/$(BARGE_VERSION)/$(@F) -o $@ | ||
|
||
isolinux.cfg: | ||
curl -L https://raw.githubusercontent.com/bargees/barge-os/$(BARGE_VERSION)/configs/$(@F) -o $@ | ||
|
||
docker.tgz: | ||
curl -L https://download.docker.com/linux/static/$(DOCKER_CHANNEL)/x86_64/docker-$(DOCKER_VERSION).tgz -o $@ | ||
|
||
docker.bash-completion: | ||
curl -L https://raw.githubusercontent.com/docker/docker-ce/v$(DOCKER_VERSION)/components/cli/contrib/completion/bash/docker -o $@ | ||
|
||
clean: | ||
$(RM) $(EXTERNAL_DEPENDENCIES) | ||
|
||
distclean: clean | ||
$(RM) $(ISO_NAME) | ||
|
||
.PHONY: clean distclean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# A dummy plugin for Barge to set hostname and network correctly at the very first `vagrant up` | ||
module VagrantPlugins | ||
module GuestLinux | ||
class Plugin < Vagrant.plugin("2") | ||
guest_capability("linux", "change_host_name") { Cap::ChangeHostName } | ||
guest_capability("linux", "configure_networks") { Cap::ConfigureNetworks } | ||
end | ||
end | ||
end | ||
|
||
Vagrant.configure(2) do |config| | ||
config.vm.define "barge-x-iso" | ||
|
||
config.vm.box = "ailispaw/barge" | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
vb.memory = 2048 | ||
end | ||
|
||
config.vm.hostname = "barge-x-iso" | ||
|
||
config.vm.synced_folder ".", "/vagrant", id: "vagrant" | ||
end |
Oops, something went wrong.