Docker DNS Mapping Deployment

Hi, so I have a scraping actor that needs to fetch data from 'example.com', but it points to 123.123.123.123 instead, usually I add ip and domain in /etc/hosts file locally, how can I can achieve this via Docker or some other means in my Apify actors(Puppeteer)?
8 Replies
fascinating-indigo
fascinating-indigo•15mo ago
Hi, somebody from team will reply soon 🙂
fascinating-indigo
fascinating-indigo•15mo ago
Hi, I'm not entirely sure I 100% understood the problem 🤔 but I think it would be worthwhile to check out our documentation article for Dockerfile, as well as our Academy for Dockerfiles and Deployment
Dockerfile | Academy | Apify Documentation
Understand how to write a Dockerfile (Docker image blueprint) for your project so that it can be run within a Docker container on the Apify platform.
Deploying | Academy | Apify Documentation
Push local code to the platform, or create a new actor on the console and integrate it with a Git repo to optionally automatically rebuild any new changes.
memo23
memo23OP•14mo ago
@lemurio I have some entries in my /etc/hosts which I want to use in apify environment as well, how can i do that? @lemurio Any feedback? Running docker locally should give me some insights right?
fascinating-indigo
fascinating-indigo•14mo ago
@Hamza can you please help here?
memo23
memo23OP•14mo ago
has anyone run docker locally and try the scraper, I am having some issue when I want to build it locally, are there any resources to this?
fascinating-indigo
fascinating-indigo•14mo ago
@Lukas Celnar can you please help here
like-gold
like-gold•14mo ago
Hi @memo23 I've asked the team regarding you issue and I will update you once ill get an answer In the meantime i recommend you this article about building and running dockerfile locally https://www.docker.com/blog/getting-started-with-docker-using-node-jspart-i/
Peter McKee
Docker
Getting Started with Docker Using Node.js(Part I) | Docker
Learn from Docker experts to simplify and advance your app development and management with Docker. Stay up to date on Docker events and new version
memo23
memo23OP•14mo ago
@Lukas Celnar thanks, I hope question is clear, I just want to take entries from my 'hosts' files and add it docker, so when I hit certain url or domain it goes to that IP address (from hosts), I already tried few scenarios but it seems it doesn't work

Did you find this page helpful?