Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
8ec0178c34
|
|||
|
300ad171ef
|
@@ -1,5 +1,2 @@
|
||||
[env]
|
||||
RUST_LOG = "automation=debug"
|
||||
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
rustflags = ["-C", "link-arg=-lc"]
|
||||
|
||||
@@ -2,5 +2,3 @@
|
||||
.env
|
||||
# Use the rust environment provided by the container
|
||||
rust-toolchain.toml
|
||||
Dockerfile
|
||||
docker-bake.hcl
|
||||
|
||||
+3
-4
@@ -1,4 +1,5 @@
|
||||
FROM rust:1.95-alpine AS base
|
||||
FROM rust:1.95 AS base
|
||||
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
|
||||
RUN cargo install cargo-chef --locked --version 0.1.71 && \
|
||||
cargo install cargo-auditable --locked --version 0.6.6
|
||||
WORKDIR /app
|
||||
@@ -9,7 +10,6 @@ COPY . .
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache g++=15.2.0-r2 cmake=4.1.3-r0 make=4.4.1-r3 openssl-dev=3.5.7-r0 openssl-libs-static=3.5.7-r0
|
||||
# HACK: Now we can use unstable feature while on stable rust!
|
||||
ENV RUSTC_BOOTSTRAP=1
|
||||
COPY --from=planner /app/recipe.json recipe.json
|
||||
@@ -20,8 +20,7 @@ ARG RELEASE_VERSION
|
||||
ENV RELEASE_VERSION=${RELEASE_VERSION}
|
||||
RUN cargo auditable build --release
|
||||
|
||||
|
||||
FROM scratch AS runtime
|
||||
FROM gcr.io/distroless/cc-debian13:nonroot AS runtime
|
||||
COPY --from=builder /app/target/release/automation /app/automation
|
||||
ENV AUTOMATION__ENTRYPOINT=/app/config/config.lua
|
||||
ENV LUA_PATH="/app/?.lua;;"
|
||||
|
||||
+1
-3
@@ -5,9 +5,7 @@ group "default" {
|
||||
targets = ["automation"]
|
||||
}
|
||||
|
||||
target "docker-metadata-action" {
|
||||
tags = []
|
||||
}
|
||||
target "docker-metadata-action" {}
|
||||
|
||||
target "automation" {
|
||||
inherits = ["docker-metadata-action"]
|
||||
|
||||
Reference in New Issue
Block a user