For Detailed Explaination Please Go through the Session which are Uploaded on LMS
Dockerfile for Node Application :
FROM node:14
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ["npm", "run", "start"]
Command to create Docker Image
docker build -t <image_name> .
Commands to push to ECR Repository:
In ECR repository you will find the view Push command button click on that to get your push commands. Run them to get the Image into ECR repository.
Run Jest and Hardhat test with Dockerfile
FROM node:14
WORKDIR /app
COPY src/package*.json ./
RUN npm install
COPY . .
RUN npx jest --config=test/jest.config.js
RUN npx hardhat test --config=test/hardat.config.js
EXPOSE 3000
CMD ["npm", "run", "start"]