about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Containerfile.alpine (renamed from Dockerfile.alpine)6
-rwxr-xr-xbuild-alpine.sh4
2 files changed, 7 insertions, 3 deletions
diff --git a/Dockerfile.alpine b/Containerfile.alpine
index a16b827..57205f9 100644
--- a/Dockerfile.alpine
+++ b/Containerfile.alpine
@@ -3,7 +3,7 @@ FROM alpine:latest
 RUN apk update \
     && apk --no-cache --update add build-base
 
-WORKDIR /bin.alpine
+WORKDIR /work
 
 COPY nitro.c .
 COPY nitroctl.c .
@@ -11,6 +11,10 @@ COPY Makefile .
 
 RUN make CFLAGS="-Os -Wl,--gc-sections -fno-asynchronous-unwind-tables -fno-stack-protector -fno-stack-clash-protection" LDFLAGS="-static"
 
+VOLUME /out
+
 RUN nm --size-sort nitro
 RUN ls -l nitro nitroctl
 RUN size nitro nitroctl
+
+RUN cp nitro nitroctl /out
diff --git a/build-alpine.sh b/build-alpine.sh
index fe5e4cb..c5eee3e 100755
--- a/build-alpine.sh
+++ b/build-alpine.sh
@@ -1,4 +1,4 @@
 #!/bin/sh -e
 rm -rf bin.alpine
-docker build -f Dockerfile.alpine --progress=plain --iidfile=id.alpine .
-docker save $(cat id.alpine) | bsdtar xO '*/layer.tar' | bsdtar xv --ignore-zeros bin.alpine/nitro bin.alpine/nitroctl
+mkdir bin.alpine
+podman build -f Containerfile.alpine -v $PWD/bin.alpine:/out:Z