docker-test: minor cleanups
parent
0a26bdedce
commit
d56136a89f
|
@ -2,7 +2,7 @@
|
||||||
## Builder
|
## Builder
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
FROM rust as planner
|
FROM rust as planner
|
||||||
RUN apt update && apt install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN cargo install cargo-chef
|
RUN cargo install cargo-chef
|
||||||
|
@ -10,7 +10,7 @@ COPY . .
|
||||||
RUN cargo chef prepare --recipe-path recipe.json
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
|
|
||||||
FROM rust as cacher
|
FROM rust as cacher
|
||||||
RUN apt update && apt install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN cargo install cargo-chef
|
RUN cargo install cargo-chef
|
||||||
|
@ -18,12 +18,13 @@ COPY --from=planner /app/recipe.json recipe.json
|
||||||
RUN cargo chef cook --release --recipe-path recipe.json
|
RUN cargo chef cook --release --recipe-path recipe.json
|
||||||
|
|
||||||
FROM rust as builder
|
FROM rust as builder
|
||||||
RUN apt update && apt install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=cacher /app/target target
|
COPY --from=cacher /app/target target
|
||||||
RUN cargo build --release --bin innernet
|
RUN cargo build --release --bin innernet
|
||||||
|
RUN strip /app/target/release/innernet
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
## Final image
|
## Final image
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
## Builder
|
## Builder
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
FROM rust as planner
|
FROM rust as planner
|
||||||
RUN apt update && apt install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN cargo install cargo-chef
|
RUN cargo install cargo-chef
|
||||||
|
@ -10,7 +10,7 @@ COPY . .
|
||||||
RUN cargo chef prepare --recipe-path recipe.json
|
RUN cargo chef prepare --recipe-path recipe.json
|
||||||
|
|
||||||
FROM rust as cacher
|
FROM rust as cacher
|
||||||
RUN apt update && apt install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN cargo install cargo-chef
|
RUN cargo install cargo-chef
|
||||||
|
@ -18,12 +18,13 @@ COPY --from=planner /app/recipe.json recipe.json
|
||||||
RUN cargo chef cook --release --recipe-path recipe.json
|
RUN cargo chef cook --release --recipe-path recipe.json
|
||||||
|
|
||||||
FROM rust as builder
|
FROM rust as builder
|
||||||
RUN apt update && apt install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
RUN apt-get update && apt-get install -y build-essential musl-tools musl-dev clang libclang-dev libsqlite3-dev
|
||||||
RUN update-ca-certificates
|
RUN update-ca-certificates
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
COPY --from=cacher /app/target target
|
COPY --from=cacher /app/target target
|
||||||
RUN cargo build --release --bin innernet-server
|
RUN cargo build --release --bin innernet-server
|
||||||
|
RUN strip /app/target/release/innernet-server
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
## Final image
|
## Final image
|
||||||
|
|
Loading…
Reference in New Issue