From 599970ed728b4a813154e4883ca05c4ab34d7f59 Mon Sep 17 00:00:00 2001 From: Ethan Paul Date: Wed, 6 Mar 2024 14:22:40 -0500 Subject: [PATCH] Add container runtime --- Containerfile | 17 +++++++++++++++++ container-entrypoint.sh | 9 +++++++++ 2 files changed, 26 insertions(+) create mode 100644 Containerfile create mode 100755 container-entrypoint.sh diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..7ef6719 --- /dev/null +++ b/Containerfile @@ -0,0 +1,17 @@ +FROM docker.io/library/ruby:3.3 + +ARG SMASHING_VERSION + +RUN gem install smashing -v ${SMASHING_VERSION} +RUN apt update --yes +RUN apt install nodejs --yes +RUN apt clean all +RUN mkdir --parents /smashing + +ENV SMASHING_PROJECT_DIR=/smashing + +ADD container-entrypoint.sh /container-entrypoint.sh + +ENTRYPOINT ["/container-entrypoint.sh"] + +CMD ["start"] diff --git a/container-entrypoint.sh b/container-entrypoint.sh new file mode 100755 index 0000000..6c9e5e7 --- /dev/null +++ b/container-entrypoint.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e + +cd "${SMASHING_PROJECT_DIR}" + +bundle install + +smashing "$@"