diff --git a/Dockerfile.custom b/Dockerfile.custom index 993d265..75ba319 100644 --- a/Dockerfile.custom +++ b/Dockerfile.custom @@ -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