From cdeaf014aebd2465d5b2b6287a13ef9954b89802 Mon Sep 17 00:00:00 2001 From: Dmitry Bashkatov Date: Fri, 1 Sep 2017 17:20:33 +0300 Subject: [PATCH] add Dockerfile --- Dockerfile | 14 ++++++++++++++ Makefile | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..334d03e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM gcc as build + +WORKDIR /usr/src +COPY . . + +ENV CFLAGS -static +RUN make + +### + +FROM scratch +COPY --from=build /usr/src/earlyoom / + +ENTRYPOINT ["/earlyoom"] diff --git a/Makefile b/Makefile index 0438918..8ec67f0 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ VERSION ?= $(shell git describe --tags --dirty) -CFLAGS = -Wall -Wextra -DVERSION=\"$(VERSION)\" -g +CFLAGS += -Wall -Wextra -DVERSION=\"$(VERSION)\" -g .PHONY: earlyoom earlyoom: