about summary refs log tree commit diff
path: root/Containerfile.alpine
diff options
context:
space:
mode:
Diffstat (limited to 'Containerfile.alpine')
-rw-r--r--Containerfile.alpine20
1 files changed, 20 insertions, 0 deletions
diff --git a/Containerfile.alpine b/Containerfile.alpine
new file mode 100644
index 0000000..57205f9
--- /dev/null
+++ b/Containerfile.alpine
@@ -0,0 +1,20 @@
+FROM alpine:latest
+
+RUN apk update \
+    && apk --no-cache --update add build-base
+
+WORKDIR /work
+
+COPY nitro.c .
+COPY nitroctl.c .
+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