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

docs for building a custom docker image #145

Open
nhooyr opened this Issue Mar 8, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@nhooyr
Copy link
Collaborator

nhooyr commented Mar 8, 2019

No description provided.

@nhooyr nhooyr added the docs label Mar 8, 2019

@nhooyr nhooyr self-assigned this Mar 8, 2019

@ymolists

This comment has been minimized.

Copy link

ymolists commented Mar 8, 2019

I am using the docker file and i am noticing that this might not be the best way for a dockerfile that is meant to only build locally. Would it make sense for example to create a new one say Dockerfile.build ?
you could for example mount the source code locally each time instead of copying it ? that would make the dockerfile maybe faster to build since the layers would not keep changing ?

@nhooyr

This comment has been minimized.

Copy link
Collaborator Author

nhooyr commented Mar 8, 2019

What do you mean only build locally?

@nhooyr

This comment has been minimized.

Copy link
Collaborator Author

nhooyr commented Mar 8, 2019

I don't believe we can mount stuff in when building a container. It has to be copied.

Furthermore, you don't see any of these artifacts in the resulting image because we're using a multi staged build.

@ymolists

This comment has been minimized.

Copy link

ymolists commented Mar 8, 2019

I think we are mixing 2 separate use cases

  1. someone who wants to hack on the code and has to build the code again and again in their environement

  2. someone who wants to just build a binary.

If someone is in 1) then it makes sense to not copy the source code in the image but mount it later when the container is started . The dockerfile would only make sure the used binaries are always the same across the possible combinations of environments and should make supporting it easier.

@nhooyr

This comment has been minimized.

Copy link
Collaborator Author

nhooyr commented Mar 8, 2019

Do you want a build.sh script to build the code instead of a Dockerfile?

I'm not sure I see the value here. @kylecarbs do we have support for incremental compilation or will each build still take 20m?

@ymolists

This comment has been minimized.

Copy link

ymolists commented Mar 8, 2019

Well maybe you can document what you do now :-) i imagine it does not take 20m to build it incrementally. This was my original question but then it drifted to using a docker file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.