Skip to content

Commit eff2ee8

Browse files
committed
Update COPY to be explicit
1 parent 00617d8 commit eff2ee8

4 files changed

Lines changed: 20 additions & 19 deletions

File tree

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ FROM chef AS planner
1313
COPY backends backends
1414
COPY core core
1515
COPY router router
16-
COPY Cargo.toml ./
17-
COPY Cargo.lock ./
16+
COPY Cargo.toml Cargo.toml
17+
COPY Cargo.lock Cargo.lock
1818

19-
RUN cargo chef prepare --recipe-path recipe.json
19+
RUN cargo chef prepare --recipe-path recipe.json
2020

2121
FROM chef AS builder
2222

@@ -48,8 +48,8 @@ RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
4848
COPY backends backends
4949
COPY core core
5050
COPY router router
51-
COPY Cargo.toml ./
52-
COPY Cargo.lock ./
51+
COPY Cargo.toml Cargo.toml
52+
COPY Cargo.lock Cargo.lock
5353

5454
FROM builder AS http-builder
5555

Dockerfile-cuda

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ WORKDIR /usr/src
2727
COPY backends backends
2828
COPY core core
2929
COPY router router
30-
COPY Cargo.toml ./
31-
COPY Cargo.lock ./
30+
COPY Cargo.toml Cargo.toml
31+
COPY Cargo.lock Cargo.lock
3232

33-
RUN cargo chef prepare --recipe-path recipe.json
33+
RUN cargo chef prepare --recipe-path recipe.json
3434

3535
FROM base-builder AS builder
3636

@@ -83,8 +83,8 @@ RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
8383
COPY backends backends
8484
COPY core core
8585
COPY router router
86-
COPY Cargo.toml ./
87-
COPY Cargo.lock ./
86+
COPY Cargo.toml Cargo.toml
87+
COPY Cargo.lock Cargo.lock
8888

8989
FROM builder AS http-builder
9090

Dockerfile-cuda-all

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ WORKDIR /usr/src
2727
COPY backends backends
2828
COPY core core
2929
COPY router router
30-
COPY Cargo.toml ./
31-
COPY Cargo.lock ./
30+
COPY Cargo.toml Cargo.toml
31+
COPY Cargo.lock Cargo.lock
3232

3333
RUN cargo chef prepare --recipe-path recipe.json
3434

@@ -48,11 +48,12 @@ ARG CARGO_BUILD_INCREMENTAL
4848
WORKDIR /usr/src
4949

5050
COPY --from=planner /usr/src/recipe.json recipe.json
51+
5152
COPY backends backends
5253
COPY core core
5354
COPY router router
54-
COPY Cargo.toml ./
55-
COPY Cargo.lock ./
55+
COPY Cargo.toml Cargo.toml
56+
COPY Cargo.lock Cargo.lock
5657

5758
FROM builder-base AS builder-75
5859

Dockerfile-intel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ FROM chef AS planner
1414
COPY backends backends
1515
COPY core core
1616
COPY router router
17-
COPY Cargo.toml ./
18-
COPY Cargo.lock ./
17+
COPY Cargo.toml Cargo.toml
18+
COPY Cargo.lock Cargo.lock
1919

20-
RUN cargo chef prepare --recipe-path recipe.json
20+
RUN cargo chef prepare --recipe-path recipe.json
2121

2222
FROM chef AS builder
2323

@@ -36,8 +36,8 @@ RUN --mount=type=secret,id=actions_results_url,env=ACTIONS_RESULTS_URL \
3636
COPY backends backends
3737
COPY core core
3838
COPY router router
39-
COPY Cargo.toml ./
40-
COPY Cargo.lock ./
39+
COPY Cargo.toml Cargo.toml
40+
COPY Cargo.lock Cargo.lock
4141

4242
RUN PROTOC_ZIP=protoc-21.12-linux-x86_64.zip && \
4343
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v21.12/$PROTOC_ZIP && \

0 commit comments

Comments
 (0)