foreign-sapphire
foreign-sapphire2y ago

CLI in a Container

Can the cli be used from within a container? Or does it need to be run natively and then a container started based on the dockerfile the cli retrieves?
4 Replies
Lukas Krivka
Lukas Krivka2y ago
Why it wouldn't work? We have both npm and homebrew distributions. You can install it during the image build.
foreign-sapphire
foreign-sapphireOP2y ago
Maybe I should clarify a little. I'm a bit confused about this statement in the docs, "with the Crawlee CLI which automatically adds the correct Dockerfile into our project folder." So the cli, running in a container, will add a dockerfile?
Alexey Udovydchenko
When you create actor by CLI, Dockerfile generated based on https://github.com/apify/apify-actor-docker to support relevant container for runs in cloud.
Lukas Krivka
Lukas Krivka2y ago
@KhanoftheNorth That's too late. You need the Dockerfile to build the image and then start the container. Basically the normal flow is that you download CLI locally, use it to generate the code templates with dockerfile, push that code to GitHub, deploy it and build it and run the container

Did you find this page helpful?