Add container build script
This commit is contained in:
4
.containerignore
Normal file
4
.containerignore
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
*
|
||||||
|
!src
|
||||||
|
!Cargo.toml
|
||||||
|
!Cargo.lock
|
||||||
20
Containerfile
Normal file
20
Containerfile
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
FROM docker.io/library/rust:1.88-alpine AS build
|
||||||
|
|
||||||
|
RUN apk --no-cache add musl-dev
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN cargo build --release --locked
|
||||||
|
|
||||||
|
RUN strip target/release/k8s-reboot-controller
|
||||||
|
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
|
||||||
|
COPY --from=build /src/target/release/k8s-reboot-controller /
|
||||||
|
|
||||||
|
ENV ROCKET_CLI_COLORS=false
|
||||||
|
|
||||||
|
ENTRYPOINT ["/k8s-reboot-controller"]
|
||||||
Reference in New Issue
Block a user