Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating dockerfile without docker daemon #1241

Open
nezygis opened this issue Aug 1, 2023 · 2 comments
Open

Creating dockerfile without docker daemon #1241

nezygis opened this issue Aug 1, 2023 · 2 comments

Comments

@nezygis
Copy link

nezygis commented Aug 1, 2023

Hello, is it possible to use cog to create a dockerfile which would later be used to build image with kaniko? The problem is that we do not want to use the docker daemon in our builds. Maybe an option to extract the dockerfile before running the docker build?

@mattt
Copy link
Contributor

mattt commented Aug 1, 2023

Hi @nezygis. Yes, you can create a Dockerfile with Cog by running cog debug.

$ cog debug > Dockerfile

@nezygis
Copy link
Author

nezygis commented Aug 1, 2023

@mattt thank you! that works for the dockerfile but when I'm trying to build the image it fails on:
COPY .cog/tmp/build4132123682/cog-0.0.1.dev-py3-none-any.whl /tmp/cog-0.0.1.dev-py3-none-any.whl

.cog/tmp/build.. directory does not exist. is there an additional build step that I need to run?

EDIT: it seems like it is due to the cleanup command being executed. is there any way to avoid it when running debug?

if err := generator.Cleanup(); err != nil {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants