From c551f40c7a435f98e266b2da204a2399b19f7021 Mon Sep 17 00:00:00 2001 From: neri Date: Wed, 10 Mar 2021 00:15:18 +0100 Subject: [PATCH] remove openssl from dependencies --- Cargo.lock | 36 ------------------------------------ Cargo.toml | 4 ---- Dockerfile | 4 ++-- 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3898da1..93e8742 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -831,7 +831,6 @@ dependencies = [ "htmlescape", "log", "mime", - "openssl-sys", "rand 0.8.3", "sqlx", "tree_magic_mini", @@ -1604,29 +1603,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "openssl-src" -version = "111.14.0+1.1.1j" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "055b569b5bd7e5462a1700f595c7c7d487691d73b5ce064176af7f9f0cbb80a9" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" -dependencies = [ - "autocfg", - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - [[package]] name = "parking" version = "2.0.0" @@ -1732,12 +1708,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "pkg-config" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" - [[package]] name = "polling" version = "2.0.2" @@ -2676,12 +2646,6 @@ dependencies = [ "ctor", ] -[[package]] -name = "vcpkg" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" - [[package]] name = "vec-arena" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index bd7c3f5..2c060a4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,11 +17,7 @@ actix-multipart = "0.3.0" futures = "0.3.13" rand = "0.8.3" chrono = "0.4.19" -openssl-sys = "0.9.60" htmlescape = "0.3.1" urlencoding = "1.1.1" tree_magic_mini = "1.0.1" mime = "0.3.16" - -[features] -vendored = ["openssl-sys/vendored"] diff --git a/Dockerfile b/Dockerfile index ffb6820..070711f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,14 +6,14 @@ RUN USER=rust cargo new datatrash WORKDIR /home/rust/src/datatrash COPY --chown=rust Cargo.toml Cargo.lock ./ -RUN cargo build --release --features vendored +RUN cargo build --release COPY --chown=rust src ./src COPY --chown=rust static ./static COPY --chown=rust template ./template COPY --chown=rust init-db.sql ./init-db.sql RUN touch src/main.rs -RUN cargo build --release --features vendored +RUN cargo build --release RUN strip target/x86_64-unknown-linux-musl/release/datatrash FROM alpine:latest