Compare commits

...

2 Commits

Author SHA1 Message Date
Dustin d99c4014e9 ci: Add Jenkins build pipeline
dustin/luci/pipeline/head There was a failure building this commit Details
2024-07-29 10:32:00 -05:00
Dustin e6d7cf69fa Add container image build script 2024-07-28 10:12:17 -05:00
3 changed files with 43 additions and 0 deletions

38
Containerfile Normal file
View File

@ -0,0 +1,38 @@
FROM docker.io/library/alpine AS build
RUN --mount=type=cache,target=/var/cache \
apk add \
cargo \
protoc \
rust \
&& :
COPY src /src/src
COPY Cargo.* /src/
WORKDIR /src
RUN cargo build --release
FROM docker.io/library/alpine
RUN --mount=type=cache,target=/var/cache \
apk add \
libgcc \
&& :
COPY --from=build /src/target/release/luci /usr/local/bin/luci
COPY dch-root-ca.crt /etc/ssl/certs
COPY nsenter.sh /usr/local/libexec/nsenter.sh
RUN for cmd in \
systemctl \
; do \
ln -s /usr/local/libexec/nsenter.sh /usr/local/bin/${cmd} \
; done
ENTRYPOINT ["luci"]

2
ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,2 @@
@Library('containerimages')_
buildContainerImage2(archlist: ['amd64', 'arm64'], pi: false)

3
nsenter.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec nsenter -t 1 -m -u -i -n -p "${0##*/}" "$@"