Add dev containers, musl build
Some checks are pending
/ verify (push) Waiting to run
/ publish (push) Waiting to run

This commit is contained in:
Juno Takano 2026-03-07 17:28:47 -03:00
commit d9341e7686
6 changed files with 86 additions and 36 deletions

View file

@ -0,0 +1,13 @@
FROM docker.io/library/rust:alpine
MAINTAINER Juno Takano juno@jutty.dev
ENV DEBUG=debug
# Install
COPY en /usr/local/bin/en
# Describe
RUN sha256sum $(which en)
# Launch
WORKDIR /root
CMD ["en", "-p", "80"]

View file

@ -0,0 +1,13 @@
FROM debian:stable-slim
MAINTAINER Juno Takano juno@jutty.dev
ENV DEBUG=debug
# Install
COPY en /usr/local/bin/en
# Describe
RUN sha256sum $(which en)
# Launch
WORKDIR /root
CMD ["en", "-p", "80"]

View file

@ -1,9 +1,21 @@
#!/usr/bin/env sh
set -eu
distro="$1"
suffix=$(printf '%s' "$1" | sed 's/.*\.//')
tag="en:$suffix"
if podman container exists "$tag"; then
podman stop --time 3 "$tag"
fi
if [ "$suffix" = 'debian-dev' ]; then
cp ../../target/release/en en
elif [ "$suffix" = 'alpine-dev' ]; then
cp ../../target/x86_64-unknown-linux-musl/release/en en
fi
podman stop --time 3 "en-$distro"
podman build \
--tag "en-$distro" \
-f "Containerfile.$distro"
--tag "$tag" \
-f "Containerfile.$suffix"
rm en

View file

@ -1,10 +1,12 @@
#!/usr/bin/env sh
set -eu
distro="$1"
suffix=$(printf '%s' "$1" | sed 's/.*\.//')
name="en-$suffix"
tag="en:$suffix"
podman run \
--replace \
--name "en-$distro" \
--name "$name" \
--publish 3008:80 \
"en-$distro"
"$tag"