From e9ebea3ed602b1005e322025a847d43a9ea875a4 Mon Sep 17 00:00:00 2001 From: doomsdayrs Date: Thu, 28 Mar 2024 18:32:31 -0400 Subject: [PATCH] Add basic containerization Having issues with javascript coming up empty though... --- Containerfile | 26 ++++++++++++++++++++++++++ scripts/build-container.sh | 3 +++ 2 files changed, 29 insertions(+) create mode 100644 Containerfile create mode 100755 scripts/build-container.sh diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..ab051b2 --- /dev/null +++ b/Containerfile @@ -0,0 +1,26 @@ +# Start rust build process +FROM docker.io/library/rust:latest as builder + +# Set working directory to /src, to keep things clean +WORKDIR /src + +# Copy source files to /src +COPY . /src + +# Build +RUN cargo install --path=./ && cargo clean -v + +# Swap to fedora runtime for the final result +FROM fedora:latest + +# Copy binary to resulting image +COPY --from=builder /usr/local/cargo/bin/ibis /bin/ibis + +# Install postgresql library +RUN sudo dnf install -y libpq + +# Set working dir to /app for mounting configs +WORKDIR /app + +# Set command to execute +CMD ["ibis"] diff --git a/scripts/build-container.sh b/scripts/build-container.sh new file mode 100755 index 0000000..57f2b67 --- /dev/null +++ b/scripts/build-container.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +podman build --tag ibis:git ..