Skip to content

Commit c8c2c77

Browse files
committed
chore(ci): fix docker context
1 parent fab1f49 commit c8c2c77

File tree

7 files changed

+32
-28
lines changed

7 files changed

+32
-28
lines changed

.github/workflows/coprocessor-docker-build-db-migration.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ jobs:
4343
id-token: "write"
4444
packages: "write"
4545
with:
46-
working-directory: "."
46+
working-directory: "coprocessor"
47+
docker-context: "coprocessor"
4748
push_image: true
4849
image-name: "fhevm/coprocessor/db-migration"
4950
generate-dev-image: false
50-
docker-file: "coprocessor/fhevm-engine/fhevm-db/Dockerfile"
51+
docker-file: "fhevm-engine/fhevm-db/Dockerfile"
5152
arm-build: true

.github/workflows/coprocessor-docker-build.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ jobs:
4444
id-token: "write"
4545
packages: "write"
4646
with:
47-
working-directory: "."
47+
working-directory: "coprocessor"
48+
docker-context: "coprocessor"
4849
push_image: true
4950
image-name: "fhevm/coprocessor"
5051
generate-dev-image: false
51-
docker-file: "coprocessor/fhevm-engine/coprocessor/Dockerfile"
52+
docker-file: "fhevm-engine/coprocessor/Dockerfile"
5253
arm-build: true

.github/workflows/gateway-contracts-docker-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
packages: "write"
5050
with:
5151
working-directory: "gateway-contracts"
52+
docker-context: "gateway-contracts"
5253
push_image: true
5354
image-name: "fhevm/gateway-contracts"
5455
docker-file: "Dockerfile"

.github/workflows/host-contracts-docker-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
packages: "write"
4545
with:
4646
working-directory: "host-contracts"
47+
docker-context: "host-contracts"
4748
push_image: true
4849
image-name: "fhevm/host-contracts"
4950
docker-file: "Dockerfile"

coprocessor/fhevm-engine/coprocessor/Dockerfile

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM ghcr.io/zama-ai/fhevm-node:latest AS contract_builder
44
USER root
55

66
WORKDIR /app
7-
COPY ./host-contracts ./host-contracts
7+
COPY ../host-contracts ./host-contracts
88

99
# Compiled host-contracts for listeners
1010
WORKDIR /app/host-contracts
@@ -63,12 +63,12 @@ ENV OPENSSL_DIR=/usr
6363

6464
WORKDIR /app
6565

66-
COPY ./host-contracts/contracts/ ./host-contracts/contracts/
66+
COPY ../host-contracts/contracts/ ./host-contracts/contracts/
6767
COPY --from=contract_builder /app/host-contracts/artifacts/contracts /app/host-contracts/artifacts/contracts
68-
COPY ./coprocessor/fhevm-engine/ ./coprocessor/fhevm-engine/
69-
COPY ./coprocessor/proto/ ./coprocessor/proto/
68+
COPY fhevm-engine/ ./fhevm-engine/
69+
COPY proto/ ./proto/
7070

71-
WORKDIR /app/coprocessor/fhevm-engine
71+
WORKDIR /app/fhevm-engine
7272

7373
# Build all binaries
7474
RUN cargo fetch && \
@@ -87,13 +87,13 @@ COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/
8787
COPY --from=builder --chown=fhevm:fhevm /home/fhevm /home/fhevm
8888
COPY --from=builder --chown=fhevm:fhevm /app /app
8989

90-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/coprocessor /usr/local/bin/coprocessor
91-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/sns_worker /usr/local/bin/sns_worker
92-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/zkproof_worker /usr/local/bin/zkproof_worker
93-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/fhevm_listener /usr/local/bin/fhevm_listener
94-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/gw_listener /usr/local/bin/gw_listener
95-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/transaction_sender /usr/local/bin/transaction_sender
96-
COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/release/cli /usr/local/bin/cli
90+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/coprocessor /usr/local/bin/coprocessor
91+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/sns_worker /usr/local/bin/sns_worker
92+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/zkproof_worker /usr/local/bin/zkproof_worker
93+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/fhevm_listener /usr/local/bin/fhevm_listener
94+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/gw_listener /usr/local/bin/gw_listener
95+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/transaction_sender /usr/local/bin/transaction_sender
96+
COPY --from=builder --chown=fhevm:fhevm /app/fhevm-engine/target/release/cli /usr/local/bin/cli
9797

9898
USER fhevm:fhevm
9999

gateway-contracts/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ RUN chown -R fhevm:fhevm /home/fhevm && \
66
chown -R fhevm:fhevm /app
77

88
# Copy only necessary files
9-
COPY --chown=fhevm:fhevm ./package.json ./package-lock.json ./
9+
COPY --chown=fhevm:fhevm package.json package-lock.json ./
1010

1111
# Install dependencies
1212
RUN npm ci && \
1313
npm prune
1414

1515
# Copy the application files
16-
COPY --chown=fhevm:fhevm ./hardhat.config.ts tsconfig.json ./
17-
COPY --chown=fhevm:fhevm ./contracts ./contracts/
18-
COPY --chown=fhevm:fhevm ./addresses ./addresses/
19-
COPY --chown=fhevm:fhevm ./tasks ./tasks/
16+
COPY --chown=fhevm:fhevm hardhat.config.ts tsconfig.json ./
17+
COPY --chown=fhevm:fhevm contracts ./contracts/
18+
COPY --chown=fhevm:fhevm addresses ./addresses/
19+
COPY --chown=fhevm:fhevm tasks ./tasks/
2020

2121
# Pre-compile proxy and mock contracts
2222
# Implementation contracts cannot be pre-compiled as they depend on the proxy contracts' addresses

host-contracts/Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,19 @@ RUN chown -R fhevm:fhevm /home/fhevm && \
2222
chown -R fhevm:fhevm /app
2323

2424
# Copy only necessary files
25-
COPY --chown=fhevm:fhevm ./package.json ./package-lock.json ./
25+
COPY --chown=fhevm:fhevm package.json package-lock.json ./
2626

2727
# Install dependencies
2828
RUN npm ci && \
2929
npm prune
3030

3131
# Copy the application files
32-
COPY --chown=fhevm:fhevm ./*.ts ./tsconfig.json ./
33-
COPY --chown=fhevm:fhevm ./contracts ./contracts/
34-
COPY --chown=fhevm:fhevm ./addresses ./addresses/
35-
COPY --chown=fhevm:fhevm ./tasks ./tasks/
36-
COPY --chown=fhevm:fhevm ./lib ./lib/
37-
COPY --chown=fhevm:fhevm ./decryptionOracle ./decryptionOracle/
32+
COPY --chown=fhevm:fhevm *.ts ./tsconfig.json ./
33+
COPY --chown=fhevm:fhevm contracts ./contracts/
34+
COPY --chown=fhevm:fhevm addresses ./addresses/
35+
COPY --chown=fhevm:fhevm tasks ./tasks/
36+
COPY --chown=fhevm:fhevm lib ./lib/
37+
COPY --chown=fhevm:fhevm decryptionOracle ./decryptionOracle/
3838

3939
# Pre-compile proxy contracts
4040
RUN npx hardhat clean && \

0 commit comments

Comments
 (0)