From d4978b4fb64e50d56153aa10d1fb11b865b618e8 Mon Sep 17 00:00:00 2001 From: 0xawaz Date: Tue, 29 Oct 2024 10:16:39 +0100 Subject: [PATCH] add dockerfiles --- operations/docker/ci.dockerfile | 17 +++++++++++++++++ operations/docker/dev.dockerfile | 27 +++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 operations/docker/ci.dockerfile create mode 100644 operations/docker/dev.dockerfile diff --git a/operations/docker/ci.dockerfile b/operations/docker/ci.dockerfile new file mode 100644 index 00000000..a1b0a98e --- /dev/null +++ b/operations/docker/ci.dockerfile @@ -0,0 +1,17 @@ +FROM node:20 + +# Set the working directory inside the container +WORKDIR /app +COPY package.json ./ + +# Install the dependencies +RUN npm install + +COPY .env.example.deployment ./ +COPY lib ./lib/ +COPY tasks ./tasks/ +COPY gateway ./gateway/ +COPY *.sh ./ +COPY *.ts ./ +COPY tsconfig.json ./ +COPY *.sh ./ \ No newline at end of file diff --git a/operations/docker/dev.dockerfile b/operations/docker/dev.dockerfile new file mode 100644 index 00000000..eff60413 --- /dev/null +++ b/operations/docker/dev.dockerfile @@ -0,0 +1,27 @@ +FROM node:20 + +# Set the working directory inside the container +WORKDIR /app +COPY package.json ./ + +# Install the dependencies +RUN npm install + +COPY .env.example.deployment ./ +COPY lib ./lib/ +COPY tasks ./tasks/ +COPY gateway ./gateway/ +COPY *.sh ./ +COPY *.ts ./ +COPY tsconfig.json ./ + +RUN cp .env.example.deployment .env +RUN ./precompute-addresses.sh + +RUN npx hardhat clean + +RUN PRIVATE_KEY_FHEVM_DEPLOYER=$(grep PRIVATE_KEY_FHEVM_DEPLOYER .env | cut -d '"' -f 2) +RUN NUM_KMS_SIGNERS=$(grep NUM_KMS_SIGNERS .env | cut -d '"' -f 2) + +RUN npx hardhat compile:specific --contract lib +RUN npx hardhat compile:specific --contract gateway