Skip to content

Commit e342ee1

Browse files
authored
fix(coprocessor): change common-docker template (#276)
1 parent 2cdeca5 commit e342ee1

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,22 @@ jobs:
3434
docker-fhevm-coprocessor:
3535
needs: check-changes
3636
if: ${{ needs.check-changes.outputs.changes-coprocessor-gw-listener == 'true' || github.event_name == 'release' }}
37-
uses: zama-ai/ci-templates/.github/workflows/docker_common.yml@44333c96991d6747e0bef6a3308bfd98b20390f8 # main
37+
uses: zama-ai/ci-templates/.github/workflows/common-docker.yml@ef9d90453e0d776453026c751fbbd48e410d605a
3838
secrets:
39-
GHCR_ACTION_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
40-
GRAVITON_BUILDER_SSH_PRIVATE_KEY: ${{ secrets.GRAVITON_BUILDER_SSH_PRIVATE_KEY }}
39+
BLOCKCHAIN_ACTIONS_TOKEN: ${{ secrets.BLOCKCHAIN_ACTIONS_TOKEN }}
40+
AWS_ACCESS_KEY_S3_USER: ${{ secrets.AWS_ACCESS_KEY_S3_USER }}
41+
AWS_SECRET_KEY_S3_USER: ${{ secrets.AWS_SECRET_KEY_S3_USER }}
4142
permissions:
42-
contents: "read"
43-
id-token: "write"
44-
packages: "write"
43+
actions: 'read'
44+
contents: 'read'
45+
pull-requests: 'read'
46+
attestations: 'write'
47+
packages: 'write'
48+
id-token: 'write'
4549
with:
4650
working-directory: "."
4751
docker-context: "."
4852
push_image: true
4953
image-name: "fhevm/coprocessor/gw-listener"
50-
generate-dev-image: false
51-
docker-file: "coprocessor/fhevm-engine/gw-listener/Dockerfile"
52-
arm-build: true
54+
docker-file: "./coprocessor/fhevm-engine/gw-listener/Dockerfile"
55+
app-cache-dir: 'fhevm-coprocessor-gw-listener'

coprocessor/fhevm-engine/gw-listener/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ WORKDIR /app/coprocessor/fhevm-engine
1313
RUN cargo fetch && \
1414
SQLX_OFFLINE=true cargo build --release -p gw-listener
1515

16-
# Stage 2: Runtime image
17-
FROM cgr.dev/chainguard/glibc-dynamic:latest AS runtime
16+
# Stage 3: Runtime image
17+
FROM cgr.dev/chainguard/glibc-dynamic:latest AS prod
1818

1919
COPY --from=builder /lib/ /lib/
2020
COPY --from=builder /bin/ /bin/
@@ -30,4 +30,6 @@ COPY --from=builder --chown=fhevm:fhevm /app/coprocessor/fhevm-engine/target/rel
3030

3131
USER fhevm:fhevm
3232

33-
CMD ["/usr/local/bin/gw_listener"]
33+
CMD ["/usr/local/bin/gw_listener"]
34+
35+
FROM prod AS dev

0 commit comments

Comments
 (0)