Compare commits

..

19 Commits

Author SHA1 Message Date
joeac 2a75395f6a adds flatnotes 2026-06-28 21:55:08 +01:00
joeac 4de23ba13a use make 2026-06-28 21:24:36 +01:00
joeac 604d8138c7 gnutls is a dependency of msmtp 2026-06-25 18:51:28 +01:00
joeac 823fbf810d adds -r30 to crond version 2026-06-22 19:14:03 +01:00
joeac 7842a2b4a8 adds crond 2026-06-22 18:50:12 +01:00
joeac cd30f061e9 adds gcc in agate (dependency) 2026-06-22 18:46:40 +01:00
joeac 0b95c11829 squishes RUN command in msmtp 2026-06-22 13:17:42 +01:00
joeac d31c4dcc76 adds msmtp 2026-06-22 12:54:04 +01:00
joeac 3a107594b1 fix broken loop: increments alpine_version_part 2026-06-22 10:33:23 +01:00
joeac a3ce072fd5 fixes and merges loops in build_and_push.sh 2026-06-22 10:06:04 +01:00
joeac 9b9964e526 adds another missing " 2026-06-22 08:41:06 +01:00
joeac 344276f9b5 adds braces to container var expansion 2026-06-22 08:39:35 +01:00
joeac 4ddd61294e adds missing " 2026-06-22 08:38:47 +01:00
joeac 7df9b124b6 remove quotes from for operand 2026-06-22 08:25:17 +01:00
joeac debcc19856 fix bug in CONTAINER_NAME_PREFIX: add 'echo' 2026-06-22 08:23:39 +01:00
joeac 838a05c6e2 uses = not -eq not compare strings 2026-06-22 08:22:49 +01:00
joeac 062c916523 uses sed instead of cut -w to cut words 2026-06-22 08:22:11 +01:00
joeac ac68e77e60 build_and_push.sh 2026-06-22 08:19:28 +01:00
joeac 37ee7cdc68 arg-ifies versions 2026-06-22 08:01:40 +01:00
17 changed files with 149 additions and 10 deletions
+1
View File
@@ -0,0 +1 @@
flatnotes-src
Executable
+55
View File
@@ -0,0 +1,55 @@
TARGETS := $(patsubst ./%/,%,$(dir $(shell find -L . -maxdepth 2 -mindepth 2 -type f -and -name Makefile)))
.PHONY: all
all: login $(TARGETS)
include config.mk
$(foreach target,$(TARGETS),$(eval include $(target)/Makefile))
container_image_name = $(REGISTRY_DOMAIN)/$(REGISTRY_USER)/$(CONTAINER_NAME_PREFIX)$(target)
app_version = $(shell head -n 1 $(target)/version)
remove_last_version_part = $(shell a="$(1)"; [ "$(1)" = "$${a%.*}" ] && echo "" || echo "$${a%.*}")
all_versions = $(if $(1),$(1) $(call all_versions,$(call remove_last_version_part,$(1))))
tag_alpine_version_parts := alpine $(addprefix alpine,$(call all_versions,$(ALPINE_VERSION)))
tag_app_version_parts = $(call all_versions,$(app_version))
tags = $(tag_app_version_parts) $(tag_alpine_version_parts)\
$(foreach app_part,$(tag_app_version_parts),$(addprefix $(app_part)-,$(tag_alpine_version_parts)))
docker_context = $(if $(DOCKER_CONTEXT_$(target)),$(DOCKER_CONTEXT_$(target)),$(target))
define build_rule =
.PHONY: build_$(target)
build_$(target):
podman build \
-t $(container_image_name):latest \
--build-arg "ALPINE_VERSION=$(ALPINE_VERSION)" \
--build-arg "VERSION=$(app_version)" \
$(docker_context)
endef
define tag_rule =
.PHONY: tag_$(target)
tag_$(target):
podman tag $(container_image_name):latest $(addprefix $(container_image_name):,$(tags))
endef
define push_rule =
.PHONY: push_$(target)
push_$(target): login
podman push "$(container_image_name):latest"
$(foreach tag,$(tags),podman push $(container_image_name):$(tag);)
endef
define target_rule =
.PHONY: $(target)
$(target): prepare_$(target) build_$(target) tag_$(target) push_$(target)
endef
.PHONY: login
login:
podman login $(REGISTRY_DOMAIN)
$(foreach target,$(TARGETS),$(eval $(target_rule)))
$(foreach target,$(TARGETS),$(eval $(build_rule)))
$(foreach target,$(TARGETS),$(eval $(tag_rule)))
$(foreach target,$(TARGETS),$(eval $(push_rule)))
clean: $(foreach target,$(TARGETS),clean_$(target))
+7 -5
View File
@@ -1,6 +1,8 @@
FROM docker.io/library/alpine:3.23
RUN apk --no-cache add rust cargo \
&& wget -O - https://github.com/mbrubeck/agate/archive/refs/tags/v3.3.20.tar.gz | tar -xz \
&& cargo install --path agate-3.3.20/ \
ARG ALPINE_VERSION
FROM docker.io/alpine:${ALPINE_VERSION}
ARG VERSION
RUN apk --no-cache add rust cargo gcc \
&& wget -O - https://github.com/mbrubeck/agate/archive/refs/tags/v${VERSION}.tar.gz | tar -xz \
&& cargo install --path agate-${VERSION}/ \
&& apk del rust cargo \
&& rm -rf agate-3.3.20 agate-target
&& rm -rf agate-${VERSION} agate-target
+7
View File
@@ -0,0 +1,7 @@
.PHONY: prepare_agate
prepare_agate:
@echo Nothing to do
.PHONY: clean_agate
clean_agate:
@echo Nothing to do
+1
View File
@@ -0,0 +1 @@
3.3.20
+7 -5
View File
@@ -1,7 +1,9 @@
FROM alpine:3.23
ARG ALPINE_VERSION
FROM docker.io/alpine:${ALPINE_VERSION}
ARG VERSION
RUN apk --no-cache add make go scdoc \
&& wget -O - https://git.sr.ht/~nytpu/comitium/archive/v1.8.2.tar.gz | tar -xz \
&& make --directory=comitium-v1.8.2 \
&& mv comitium-v1.8.2/build/comitium /usr/local/bin/comitium \
&& wget -O - https://git.sr.ht/~nytpu/comitium/archive/v${VERSION}.tar.gz | tar -xz \
&& make --directory=comitium-v${VERSION} \
&& mv comitium-v${VERSION}/build/comitium /usr/local/bin/comitium \
&& apk del make go scdoc \
&& rm -rf comitium-v1.8.2
&& rm -rf comitium-v${VERSION}
+7
View File
@@ -0,0 +1,7 @@
.PHONY: prepare_comitium
prepare_comitium:
@echo Nothing to do
.PHONY: clean_comitium
clean_comitium:
@echo Nothing to do
+1
View File
@@ -0,0 +1 @@
1.8.2
+5
View File
@@ -0,0 +1,5 @@
REGISTRY_DOMAIN := git.joeac.net
REGISTRY_USER := joeac
ARCHITECTURE := $(shell lscpu | grep ^Architecture: | sed "s/Architecture:[[:space:]]*//")
CONTAINER_NAME_PREFIX := $(if $(filter armv7%,$(ARCHITECTURE)),armv7/)
ALPINE_VERSION := 3.23
+5
View File
@@ -0,0 +1,5 @@
ARG ALPINE_VERSION
FROM docker.io/alpine:${ALPINE_VERSION}
ARG VERSION
RUN apk --no-cache add busybox-openrc=${VERSION}
RUN rc-update add crond
+7
View File
@@ -0,0 +1,7 @@
.PHONY: prepare_crond
prepare_crond:
@echo Nothing to do
.PHONY: clean_crond
clean_crond:
@echo Nothing to do
+1
View File
@@ -0,0 +1 @@
1.37.0-r30
+15
View File
@@ -0,0 +1,15 @@
flatnotes_version = $(let target,flatnotes,$(app_version))
DOCKER_CONTEXT_flatnotes = flatnotes-src/flatnotes-$(flatnotes_version)
.PHONY: prepare_flatnotes
prepare_flatnotes: flatnotes-src
flatnotes-src: flatnotes/version
wget -O- https://github.com/dullage/flatnotes/archive/refs/tags/v$(flatnotes_version).tar.gz \
| gzip -d | tar -xf -
rm -rf flatnotes-src
mkdir flatnotes-src
mv flatnotes-$(flatnotes_version) flatnotes-src
clean_flatnotes:
rm -rf flatnotes-src flatnotes.tar flatnotes.tar.gz
+1
View File
@@ -0,0 +1 @@
5.5.4
+21
View File
@@ -0,0 +1,21 @@
ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
RUN mkdir -p /var/msmtp
WORKDIR /var/msmtp
ARG VERSION
RUN apk --no-cache add git autoconf automake build-base gettext gettext-dev gnutls gnutls-dev libtool make texinfo \
&& git clone https://github.com/marlam/msmtp.git --branch msmtp-${VERSION} --single-branch --depth 1 msmtp \
&& cd msmtp \
&& autoreconf -fi \
&& ./configure \
&& make \
&& make install \
&& cp src/msmtp src/msmtpd /usr/local/bin \
&& rm -rf msmtp \
&& apk del git autoconf automake build-base gettext-dev gnutls-dev libtool make texinfo
CMD msmtpd \
--auth=$SMTP_USER,'echo $SMTP_PASSWORD' \
--command='msmtp -C .msmtprc -f %F --' \
--interface=0.0.0.0 \
--log=/var/msmtp/msmtpd.log \
--port=$SMTP_PORT
+7
View File
@@ -0,0 +1,7 @@
.PHONY: prepare_msmtp
prepare_msmtp:
@echo Nothing to do
.PHONY: clean_msmtp
clean_msmtp:
@echo Nothing to do
+1
View File
@@ -0,0 +1 @@
1.8.32