Browse Source

Rust/* remove TE dependencies and base files [ci lang-only Rust] (#3518)

* Rust/* remove TE dependencies and base files [ci lang-only Rust]

* fix tokio [ci lang-only Rust]
Nate 7 years ago
parent
commit
e0f010aa77

+ 0 - 7
frameworks/Rust/actix/actix-base.dockerfile

@@ -1,7 +0,0 @@
-FROM techempower/rust:0.1
-
-ADD ./ /actix
-WORKDIR /actix
-
-RUN cargo clean
-RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

+ 7 - 1
frameworks/Rust/actix/actix-diesel.dockerfile

@@ -1,3 +1,9 @@
-FROM techempower/actix-base:0.1
+FROM rust:1.25
+
+ADD ./ /actix
+WORKDIR /actix
+
+RUN cargo clean
+RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 
 
 CMD ./target/release/actix-diesel
 CMD ./target/release/actix-diesel

+ 7 - 1
frameworks/Rust/actix/actix-pg.dockerfile

@@ -1,3 +1,9 @@
-FROM techempower/actix-base:0.1
+FROM rust:1.25
+
+ADD ./ /actix
+WORKDIR /actix
+
+RUN cargo clean
+RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 
 
 CMD ./target/release/actix-pg
 CMD ./target/release/actix-pg

+ 7 - 1
frameworks/Rust/actix/actix.dockerfile

@@ -1,3 +1,9 @@
-FROM techempower/actix-base:0.1
+FROM rust:1.25
+
+ADD ./ /actix
+WORKDIR /actix
+
+RUN cargo clean
+RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 
 
 CMD ./target/release/actix
 CMD ./target/release/actix

+ 0 - 6
frameworks/Rust/hyper/hyper-base.dockerfile

@@ -1,6 +0,0 @@
-FROM techempower/rust:0.1
-
-COPY ./ ./
-
-RUN cargo clean
-RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

+ 7 - 1
frameworks/Rust/hyper/hyper-pipeline.dockerfile

@@ -1,3 +1,9 @@
-FROM techempower/hyper-base:0.1
+FROM rust:1.25
+
+ADD ./ /hyper
+WORKDIR /hyper
+
+RUN cargo clean
+RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 
 
 CMD ["./target/release/hyper-techempower", "pipeline"]
 CMD ["./target/release/hyper-techempower", "pipeline"]

+ 7 - 1
frameworks/Rust/hyper/hyper.dockerfile

@@ -1,3 +1,9 @@
-FROM techempower/hyper-base:0.1
+FROM rust:1.25
+
+ADD ./ /hyper
+WORKDIR /hyper
+
+RUN cargo clean
+RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 
 
 CMD ["./target/release/hyper-techempower"]
 CMD ["./target/release/hyper-techempower"]

+ 4 - 2
frameworks/Rust/iron/iron.dockerfile

@@ -1,7 +1,9 @@
-FROM techempower/rust:0.1
+FROM rust:1.25
 
 
-COPY ./ ./
+ADD ./ /iron
+WORKDIR /iron
 
 
 RUN cargo clean
 RUN cargo clean
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
+
 CMD ./target/release/iron
 CMD ./target/release/iron

+ 3 - 2
frameworks/Rust/may-minihttp/may-minihttp.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/rust:0.1
+FROM rust:1.25
 
 
-COPY ./ ./
+ADD ./ /may
+WORKDIR /may
 
 
 RUN cargo clean
 RUN cargo clean
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

+ 3 - 2
frameworks/Rust/nickel/nickel.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/rust:0.1
+FROM rust:1.25
 
 
-COPY ./ ./
+ADD ./ /nickel
+WORKDIR /nickel
 
 
 RUN cargo clean
 RUN cargo clean
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

+ 3 - 2
frameworks/Rust/rouille/rouille.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/rust:0.1
+FROM rust:1.25
 
 
-COPY ./ ./
+ADD ./ /rouille
+WORKDIR /rouille
 
 
 RUN cargo clean
 RUN cargo clean
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

+ 1 - 1
frameworks/Rust/tokio-minihttp/src/main.rs

@@ -148,7 +148,7 @@ fn main() {
 
 
     let dbhost = match option_env!("DBHOST") {
     let dbhost = match option_env!("DBHOST") {
         Some(it) => it,
         Some(it) => it,
-        _ => "localhost"
+        _ => "tfb-database"
     };
     };
     let db_url = format!("postgres://benchmarkdbuser:benchmarkdbpass@{}/hello_world", dbhost);
     let db_url = format!("postgres://benchmarkdbuser:benchmarkdbpass@{}/hello_world", dbhost);
     let db_config = r2d2::Config::default();
     let db_config = r2d2::Config::default();

+ 3 - 2
frameworks/Rust/tokio-minihttp/tokio-minihttp.dockerfile

@@ -1,6 +1,7 @@
-FROM techempower/rust:0.1
+FROM rust:1.25
 
 
-COPY ./ ./
+ADD ./ /tokio
+WORKDIR /tokio
 
 
 RUN cargo clean
 RUN cargo clean
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release
 RUN RUSTFLAGS="-C target-cpu=native" cargo build --release

+ 0 - 12
toolset/setup/docker/languages/rust.dockerfile

@@ -1,12 +0,0 @@
-FROM techempower/base:0.1
-
-ENV RUST_VERSION="1.24.1"
-
-RUN wget https://static.rust-lang.org/dist/rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
-RUN tar xf rust-${RUST_VERSION}-x86_64-unknown-linux-gnu.tar.gz
-
-RUN cd rust-${RUST_VERSION}-x86_64-unknown-linux-gnu && \
-	./install.sh --prefix=/rust
-
-ENV LD_LIBRARY_PATH=/rust/lib:${LD_LIBRARY_PATH}
-ENV PATH=/rust/bin:${PATH}