From c2c77445b8c524811f0057f1175c1ba1f9875daf Mon Sep 17 00:00:00 2001 From: Luca Matei Pintilie Date: Tue, 9 Apr 2024 19:00:19 +0200 Subject: [PATCH] Add Containerfile --- Containerfile | 14 ++++++++++++++ INSTALL.md | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Containerfile diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..a02b860 --- /dev/null +++ b/Containerfile @@ -0,0 +1,14 @@ +FROM docker.io/alpine:3.19 + +ENV MIX_ENV=prod + +RUN apk add --update --no-cache elixir + +WORKDIR /app + +COPY . /app + +RUN mix deps.get +RUN mix release + +CMD _build/prod/rel/matrix2051/bin/matrix2051 start diff --git a/INSTALL.md b/INSTALL.md index beb01e8..02348bc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -59,3 +59,21 @@ This does the following: * Create a temporary user to run the process as * Makes sure the process can't write any file on the system or gain new capabilities (implied by `DynamicUser=true`) + +# Running matrix2051 as a container + +Alternatively a Containerfile is provided as well for convenience. The +image can be built with either [podman](https://podman.io/) or +[docker](https://www.docker.com/). + +To build it: + +``` +podman build -t matrix2051 . +``` + +To run it: + +``` +podman run --publish 2051:2051 --interactive matrix2051 +```