content: FROM node:16-alpine
  
  # Install necessary packages
  RUN apk add --no-cache python3 g++ make git
  
  # Create app directory
  WORKDIR /app
  
  # Initialize npm project 
  RUN npm init -y
  
  
  # Install Hardhat and dependencies
  RUN npm install --save-dev hardhat@2.16.0 @nomiclabs/hardhat-ethers@2.2.2 ethers@5.7.2 --legacy-peer-deps
  RUN npm install --save-dev @openzeppelin/contracts@4.8.2 --legacy-peer-deps
  RUN npm install dotenv
  
  # Create project structure
  RUN mkdir -p deployment/artifacts contracts/scripts
  
  # Copy the Solidity contracts
  COPY contracts/AggregationCoordinator.sol contracts/
  COPY contracts/ModelUpdateLedger.sol contracts/
  COPY contracts/ParticipantRegistry.sol contracts/
  COPY contracts/scripts/deploy.js contracts/scripts/
  COPY contracts/scripts/checkDeployment.js contracts/scripts/
  
  # Copy hardhat configuration
  COPY hardhat.config.js ./
  
  # Set environment variables
  ENV NODE_ENV=development
  ENV DEBUG=true
  
  # Command to run (will be overridden by docker-compose)
  # CMD ["npx", "hardhat", "run", "contracts/scripts/deploy.js", "--network", "localhost"] 