Cache Cargo dependencies for Docker build.
This commit is contained in:
@@ -6,6 +6,9 @@ WORKDIR /home/rust/src
|
|||||||
RUN USER=root cargo new --bin revolt
|
RUN USER=root cargo new --bin revolt
|
||||||
WORKDIR /home/rust/src/revolt
|
WORKDIR /home/rust/src/revolt
|
||||||
COPY Cargo.toml Cargo.lock ./
|
COPY Cargo.toml Cargo.lock ./
|
||||||
|
COPY src/bin/dummy.rs ./src/bin/dummy.rs
|
||||||
|
RUN cargo build --release --bin dummy
|
||||||
|
|
||||||
COPY assets/templates ./assets/templates
|
COPY assets/templates ./assets/templates
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
# Tip: for subsequent builds, don't update Cargo.toml
|
# Tip: for subsequent builds, don't update Cargo.toml
|
||||||
# in order to not download all the crates again.
|
# in order to not download all the crates again.
|
||||||
# Update Cargo.toml on major release.
|
# Update Cargo.toml on major release.
|
||||||
version=0.4.1-alpha.4
|
version=0.4.1-alpha.4-patch.0
|
||||||
docker build -t revoltchat/server:${version} . &&
|
docker build -t revoltchat/server:${version} . &&
|
||||||
docker push revoltchat/server:${version}
|
docker push revoltchat/server:${version}
|
||||||
|
|||||||
1
src/bin/dummy.rs
Normal file
1
src/bin/dummy.rs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
fn main() {}
|
||||||
Reference in New Issue
Block a user