Hardhat blockchain node FROM node:18-alpine Install system dependencies RUN apk add…
- User
Hardhat blockchain node
FROM node:18-alpine
Install system dependencies
RUN apk add --no-cache curl git python3 make g++
Create app directory
WORKDIR /app
Copy package files
COPY package*.json ./
Install dependencies
RUN npm ci
Copy source code
COPY . .
Compile contracts
RUN npx hardhat compile
Create non-root user
RUN addgroup -g 1001 -S nodejs &&
adduser -S nodejs -u 1001 &&
chown -R nodejs:nodejs /appUSER nodejs
Expose port
EXPOSE 8545
Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3
CMD curl -f http://localhost:8545 || exit 1Start Hardhat node
CMD ["npx", "hardhat", "node", "--hostname", "0.0.0.0"]
- Assistant
- User
215.2 npm error code ETIMEDOUT 215.2 npm error syscall read 215.2 npm error errno -110 215.2 npm error network read ETIMEDOUT 215.2 npm error network This is a problem related to network connectivity. 215.2 npm error network In most cases you are behind a proxy or have bad network settings. 215.2 npm error network 215.2 npm error network If you are behind a proxy, please make sure that the 215.2 npm error network 'proxy' config is set properly. See: 'npm help config' 215.2 npm notice 215.2 npm notice New major version of npm available! 10.8.2 -> 11.4.1 215.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.4.1 215.2 npm notice To update run: npm install -g npm@11.4.1 215.2 npm notice 215.2 npm error A complete log of this run can be found in: /root/.npm/_logs/2025-05-25T17_43_49_948Z-debug-0.log
- Assistant