Skip to content

Commit a45a9b2

Browse files
committed
fix: dockerfile
1 parent 096597f commit a45a9b2

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# include source files
55
!/bin
6+
!/.cargo
67
!/crates
78
!/testing
89
!/tests

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ RUN --mount=target=. \
1414
FROM chef AS builder
1515
WORKDIR /app
1616
COPY --from=planner /recipe.json recipe.json
17-
RUN --mount=type=bind,source=.cargo,target=/app/.cargo
18-
cargo chef cook --release --recipe-path recipe.json
17+
COPY .cargo /app/.cargo
18+
RUN cargo chef cook --release --recipe-path recipe.json
1919
RUN --mount=target=. \
2020
cargo build ${CARGO_FEATURES:+--features $CARGO_FEATURES} --release --target-dir=/app-target
2121

@@ -30,6 +30,6 @@ WORKDIR /app
3030

3131
COPY --from=builder /app-target/release/rollup-node /bin/
3232

33-
EXPOSE 30303 30303/udp 9001 8545 8546
33+
EXPOSE 30303 30303/udp 9001 8545 8546 6669
3434

3535
ENTRYPOINT ["rollup-node"]

Dockerfile.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ RUN cargo chef prepare --recipe-path /recipe.json
2727
FROM chef AS builder
2828
WORKDIR /app
2929
COPY --from=planner /recipe.json recipe.json
30+
COPY .cargo /app/.cargo
3031
RUN --mount=type=cache,target=/usr/local/cargo/registry \
3132
--mount=type=cache,target=/usr/local/cargo/git \
32-
--mount=type=bind,source=.cargo,target=/app/.cargo
3333
cargo chef cook --release --recipe-path recipe.json
3434

3535
COPY . .
@@ -47,6 +47,6 @@ WORKDIR /app
4747

4848
COPY --from=builder /app-target/release/rollup-node /bin/
4949

50-
EXPOSE 30303 30303/udp 9001 8545 8546
50+
EXPOSE 30303 30303/udp 9001 8545 8546 6669
5151

5252
ENTRYPOINT ["rollup-node"]

0 commit comments

Comments
 (0)