This commit is contained in:
gigirassy
2026-08-27 23:35:29 -04:00
parent 75406f4206
commit 318d4d33c1
+15 -13
View File
@@ -10,19 +10,21 @@ WORKDIR /app
COPY Cargo.toml . COPY Cargo.toml .
COPY src ./src COPY src ./src
RUN mkdir -p /root/.cargo && printf '\ RUN mkdir -p /root/.cargo && cat > /root/.cargo/config.toml <<'EOF'
[profile.release]\n\ [profile.release]
lto = true\n\ lto = true
codegen-units = 1\n\ codegen-units = 1
opt-level = '3'\n\ opt-level = '3'
panic = "abort"\n\ panic = "abort"
strip = true\n strip = true
[target.x86_64-unknown-linux-gnu]\n\
rustflags = [\n\ [target.x86_64-unknown-linux-gnu]
"-C", "target-cpu=native",\n\ rustflags = [
"-C", "codegen-units=1",\n\ "-C", "target-cpu=native",
"-C", "debuginfo=0"\n\ "-C", "codegen-units=1",
]\n' > /root/.cargo/config.toml "-C", "debuginfo=0"
]
EOF
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y RUN curl https://sh.rustup.rs -sSf | sh -s -- -y