test: add DOMAIN_NAME to Caddyfile

This commit is contained in:
Ryan Heywood 2025-07-23 20:56:22 -04:00
parent 4ae36a910c
commit 2f1a632556
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,7 @@
# A hello-world example.
ARG DOMAIN_NAME
FROM stagex/pallet-rust:sx2025.06.1 AS pallet-rust
FROM stagex/user-eif_build:sx2025.06.1 AS eif_build
FROM stagex/user-gen_initramfs:sx2025.06.1 AS gen_initramfs
@ -23,11 +27,21 @@ WORKDIR /build_cpio
RUN cp /src/target/${TARGET}/release/nit init
RUN cp /src/target/${TARGET}/release/hello hello
ENV KBUILD_BUILD_TIMESTAMP=1
ARG DOMAIN_NAME
COPY <<EOF Caddyfile
${DOMAIN_NAME} {
respond "HTTPS, World!"
}
EOF
COPY <<-EOF initramfs.list
file /init init 0755 0 0
dir /run 0755 0 0
dir /tmp 0755 0 0
dir /etc 0755 0 0
dir /etc/caddy 0755 0 0
file /etc/caddy/Caddyfile Caddyfile 0755 0 0
dir /bin 0755 0 0
dir /sbin 0755 0 0
dir /proc 0755 0 0

View File

@ -2,9 +2,11 @@
default: out/nitro.eif
out/nitro.eif: Cargo.lock Cargo.toml Containerfile $(shell git ls-files crates)
test ! -z $(DOMAIN_NAME)
docker build \
--progress=plain \
--output type=local,rewrite-timestamp=true,dest=out \
--build-arg DOMAIN_NAME=$(DOMAIN_NAME) \
-f Containerfile \
.