Open ansonlc opened 3 years ago
@ansonlc thanks for creating this issue! I see, since docker buildkit has a similar feature where a .dockerignore
can be specified as <dockerfile-name>.dockerignore
, we thought we could implement a feature were devspace would prefer devspace.dockerignore
over a regular .dockerignore
. This would not require a new config option and should solve your issue. What do you think about this?
@ansonlc thanks for creating this issue! I see, since docker buildkit has a similar feature where a
.dockerignore
can be specified as<dockerfile-name>.dockerignore
, we thought we could implement a feature were devspace would preferdevspace.dockerignore
over a regular.dockerignore
. This would not require a new config option and should solve your issue. What do you think about this? @FabianKramm that would be great! thanks for getting back to me so fast!
Is your feature request related to a problem? our production image doesn’t include our tests in the image, but we want them in the dev image to reduce the size of the initial sync.
Which solution do you suggest? allow users to specify which .dockerignore to use for image building
Which alternative solutions exist? define a hook that calls a devspace custom command which could do something like this: mv .dockerignore ./devspace/.dockerignore cp .dockerignore_dev .dockerignore This hook could be triggered before image building and then a second hook could do this: mv -f ./devspace/.dockerignore .dockerignore And this second hook would run after image building
/kind feature