Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit b469dfe

Browse files
committed
chore: unify docker images
Signed-off-by: Jawad Tariq <sjcool420@hotmail.co.uk>
1 parent a01e135 commit b469dfe

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.dockerignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,12 @@
1313
!tools/config/nextest.toml
1414
!.git
1515

16+
# Allow contract related code
17+
!contracts/contracts/**/*
18+
!contracts/hardhat.config.ts
19+
!contracts/package*.json
20+
!contracts/scripts/**/*
21+
!contracts/tsconfig.json
22+
!contracts/typechain-types/**/*
23+
1624
!LICENSE

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
ARG RUSTUP_TOOLCHAIN=stable
2+
3+
FROM node:18.15.0-slim as topos-contracts
4+
5+
WORKDIR /usr/src/app
6+
7+
COPY ./contracts/package*.json .
8+
RUN npm install
9+
10+
COPY ./contracts .
11+
12+
RUN npm run build
13+
214
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/topos-protocol/rust_builder:bullseye-${RUSTUP_TOOLCHAIN} AS base
315

416
ARG FEATURES
@@ -13,6 +25,9 @@ WORKDIR /usr/src/app
1325

1426
FROM --platform=${BUILDPLATFORM:-linux/amd64} base AS build
1527
COPY . .
28+
29+
COPY --from=topos-contracts /usr/src/app/artifacts ./contracts/artifacts
30+
1631
RUN --mount=type=secret,id=aws,target=/root/.aws/credentials \
1732
--mount=type=cache,id=sccache,target=/root/.cache/sccache \
1833
cargo build --release --no-default-features --features=${FEATURES} \

0 commit comments

Comments
 (0)