Compare commits

...

2 Commits

Author SHA1 Message Date
Ethan Paul a944cf3878
Add repo and build automation 2024-03-06 14:22:49 -05:00
Ethan Paul 599970ed72
Add container runtime 2024-03-06 14:22:40 -05:00
3 changed files with 42 additions and 0 deletions

17
Containerfile Normal file
View File

@ -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"]

16
Makefile Normal file
View File

@ -0,0 +1,16 @@
REPOSITORY = vcs.enp.one/skylab/smashing-container
SMASHING_VERSION = 1.3.6
.PHONY: help docs
# source: https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html
help: ## List Makefile targets
$(info Makefile documentation)
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-10s\033[0m %s\n", $$1, $$2}'
image: ## Build image
podman build . --tag $(REPOSITORY):$(SMASHING_VERSION) --build-arg "SMASHING_VERSION=$(SMASHING_VERSION)"
push: image ## Build and publish image
podman push $(REPOSITORY):$(SMASHING_VERSION)

9
container-entrypoint.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
cd "${SMASHING_PROJECT_DIR}"
bundle install
smashing "$@"