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 src ./src
RUN mkdir -p /root/.cargo && printf '\
[profile.release]\n\
lto = true\n\
codegen-units = 1\n\
opt-level = '3'\n\
panic = "abort"\n\
strip = true\n
[target.x86_64-unknown-linux-gnu]\n\
rustflags = [\n\
"-C", "target-cpu=native",\n\
"-C", "codegen-units=1",\n\
"-C", "debuginfo=0"\n\
]\n' > /root/.cargo/config.toml
RUN mkdir -p /root/.cargo && cat > /root/.cargo/config.toml <<'EOF'
[profile.release]
lto = true
codegen-units = 1
opt-level = '3'
panic = "abort"
strip = true
[target.x86_64-unknown-linux-gnu]
rustflags = [
"-C", "target-cpu=native",
"-C", "codegen-units=1",
"-C", "debuginfo=0"
]
EOF
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y