From 8a9f4c80d8cef6cda253f5169ee2e5dabe1c338b Mon Sep 17 00:00:00 2001 From: Udo Seidel Date: Sat, 25 Aug 2018 22:05:38 +0200 Subject: [PATCH 1/3] hello-base package which uses basic hello world package - taken from rumprun project --- hello-base/Dockerfile | 5 +++++ hello-base/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 hello-base/Dockerfile create mode 100644 hello-base/Makefile diff --git a/hello-base/Dockerfile b/hello-base/Dockerfile new file mode 100644 index 0000000..1fe7a7b --- /dev/null +++ b/hello-base/Dockerfile @@ -0,0 +1,5 @@ +FROM scratch + +COPY hello.nabla /hello.nabla + +ENTRYPOINT ["/hello.nabla"] diff --git a/hello-base/Makefile b/hello-base/Makefile new file mode 100644 index 0000000..6f2ef15 --- /dev/null +++ b/hello-base/Makefile @@ -0,0 +1,40 @@ +# Copyright (c) 2018 Contributors as noted in the AUTHORS file +# +# Permission to use, copy, modify, and/or distribute this software +# for any purpose with or without fee is hereby granted, provided +# that the above copyright notice and this permission notice appear +# in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL +# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE +# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR +# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS +# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +export TOP=$(abspath ..) +all: build_docker + +RUMPPKGS=$(TOP)/rumprun-packages +RUMPRUN=$(TOP)/rumprun +include ../Makefile.inc + +.PHONY: rumprun-packages-hello +rumprun-packages-hello: rumprun solo5 FORCE + install -m 664 -D $(RUMPPKGS)/config.mk.dist $(RUMPPKGS)/config.mk + source $(RUMPRUN)/obj/config-PATH.sh && make -C $(RUMPPKGS)/hello bin/hello.seccomp + install -m 775 -D $(RUMPPKGS)/hello/bin/hello.seccomp hello.nabla + +rumprun-packages-hello-clean: + make -C $(RUMPPKGS)/hello clean + +build_docker: submodule_warning $(FILES) rumprun-packages-hello + sudo docker build -f Dockerfile -t nabla-hello-base . + sudo docker tag nabla-hello-base nablact/nabla-hello-base + +clean: + rm -rf hello.nabla + +distclean: clean rumprun-packages-hello-clean solo5-clean rumprun-clean From 7fe13c1403b61fbdac668846bf24d5e054187215 Mon Sep 17 00:00:00 2001 From: Udo Seidel Date: Sat, 25 Aug 2018 22:57:07 +0200 Subject: [PATCH 2/3] Readme adjusted to cover new hello-base --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4b4e2a7..87ecaff 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ containers. So far we provide the following: node-base python3-base redis-base + hello-base ### Building the bases From 9d23f77ca6fd895ac50be8a2c6dd51e7ac201934 Mon Sep 17 00:00:00 2001 From: Udo Seidel Date: Fri, 28 Sep 2018 19:55:42 +0200 Subject: [PATCH 3/3] new setup with build and runtime images, removed hello-base and added cc-build --- cc-build/Dockerfile | 11 +++++++++++ {hello-base => cc-build}/Makefile | 21 ++++++++------------- hello-base/Dockerfile | 5 ----- 3 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 cc-build/Dockerfile rename {hello-base => cc-build}/Makefile (59%) delete mode 100644 hello-base/Dockerfile diff --git a/cc-build/Dockerfile b/cc-build/Dockerfile new file mode 100644 index 0000000..f6b1322 --- /dev/null +++ b/cc-build/Dockerfile @@ -0,0 +1,11 @@ +FROM ubuntu:18.04 + +RUN apt-get update +RUN apt-get install -y build-essential git + +ADD rumprun-solo5 /root/nabla-base-build/rumprun + +ENV PATH="/root/nabla-base-build/rumprun/rumprun-solo5/bin:${PATH}" +ENV CC="x86_64-rumprun-netbsd-gcc" + + diff --git a/hello-base/Makefile b/cc-build/Makefile similarity index 59% rename from hello-base/Makefile rename to cc-build/Makefile index 6f2ef15..b3cc848 100644 --- a/hello-base/Makefile +++ b/cc-build/Makefile @@ -21,20 +21,15 @@ RUMPPKGS=$(TOP)/rumprun-packages RUMPRUN=$(TOP)/rumprun include ../Makefile.inc -.PHONY: rumprun-packages-hello -rumprun-packages-hello: rumprun solo5 FORCE - install -m 664 -D $(RUMPPKGS)/config.mk.dist $(RUMPPKGS)/config.mk - source $(RUMPRUN)/obj/config-PATH.sh && make -C $(RUMPPKGS)/hello bin/hello.seccomp - install -m 775 -D $(RUMPPKGS)/hello/bin/hello.seccomp hello.nabla +.PHONY: rumprun-cc +rumprun-cc: rumprun solo5 FORCE + cp -r $(RUMPRUN)/rumprun-solo5 rumprun-solo5 -rumprun-packages-hello-clean: - make -C $(RUMPPKGS)/hello clean - -build_docker: submodule_warning $(FILES) rumprun-packages-hello - sudo docker build -f Dockerfile -t nabla-hello-base . - sudo docker tag nabla-hello-base nablact/nabla-hello-base +build_docker: submodule_warning $(FILES) rumprun-cc + sudo docker build -f Dockerfile -t nabla-cc-build . + sudo docker tag nabla-hello-base nablact/nabla-cc-build clean: - rm -rf hello.nabla + rm -rf rumprun-solo5 -distclean: clean rumprun-packages-hello-clean solo5-clean rumprun-clean +distclean: clean solo5-clean rumprun-clean diff --git a/hello-base/Dockerfile b/hello-base/Dockerfile deleted file mode 100644 index 1fe7a7b..0000000 --- a/hello-base/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -FROM scratch - -COPY hello.nabla /hello.nabla - -ENTRYPOINT ["/hello.nabla"]