File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed
.github/actions/docker-publish Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ inputs:
15
15
docker_platforms :
16
16
require : true
17
17
docker_file :
18
- default : deployment/ Dockerfile
18
+ default : Dockerfile
19
19
require : true
20
20
docker_username :
21
21
require : true
Original file line number Diff line number Diff line change
1
+ # Stage 1: Build
2
+ FROM lukemathwalker/cargo-chef:latest-rust-1.79 as chef
3
+ WORKDIR /build/
4
+ # hadolint ignore=DL3008
5
+
6
+ FROM chef as planner
7
+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=true
8
+ COPY . .
9
+ RUN cargo chef prepare --recipe-path recipe.json --bin fuel-block-committer
10
+
11
+ FROM chef as builder
12
+ COPY --from=planner /build/recipe.json recipe.json
13
+ # Build our project dependencies, not our application!
14
+ RUN cargo chef cook --release --recipe-path recipe.json --bin fuel-block-committer
15
+ # Up to this point, if our dependency tree stays the same,
16
+ # all layers should be cached.
17
+ COPY . .
18
+ RUN cargo build --release --bin fuel-block-committer
19
+
20
+ # Stage 2: Run
21
+ FROM ubuntu:22.04 as run
22
+
23
+ RUN apt-get update -y \
24
+ && apt-get install -y --no-install-recommends ca-certificates \
25
+ # Clean up
26
+ && apt-get autoremove -y \
27
+ && apt-get clean -y \
28
+ && rm -rf /var/lib/apt/lists/*
29
+
30
+ WORKDIR /root/
31
+
32
+ COPY --from=builder /build/target/release/fuel-block-committer .
33
+ COPY --from=builder /build/target/release/fuel-block-committer.d .
34
+
35
+ ENTRYPOINT ["./fuel-block-committer" ]
You can’t perform that action at this time.
0 commit comments