Dockerfile 416 B

12345678910111213141516171819202122
  1. # Base image with Node.js
  2. FROM node:18
  3. # Install Tor
  4. RUN apt-get update && apt-get install -y tor
  5. # Set up the working directory
  6. WORKDIR /app
  7. # Copy application files
  8. COPY package.json package-lock.json ./
  9. RUN npm install
  10. COPY . .
  11. # Copy the Tor configuration file
  12. COPY torrc /etc/tor/torrc
  13. # Expose ports for HTTP proxy server
  14. EXPOSE 3000
  15. # Start both Tor and the Node.js proxy server
  16. CMD tor & node index.js