mesg-foundation / engine

Build apps or autonomous workflows with reusable, shareable integrations connecting any service, app, blockchain or decentralized network.
https://mesg.com/
Apache License 2.0
130 stars 13 forks source link

Support .dockerignore file #385

Closed antho1404 closed 6 years ago

antho1404 commented 6 years ago

we can add a .mesgignore file to ignore specific folders/files that we don't want as in the .dockerignore. We should document this

krhubert commented 6 years ago

Can't someone use .dockerignore for that?

NicolasMahe commented 6 years ago

.mesgignore and .dockerignore are working very similar but are not the same.

The problem is .dockerignore is implemented in the CLI of Docker, not by the Docker Engine. So as Core is using directly the Docker Engine, we had to recreate the same functionality. We name it .mesgignore to show that it's not a .dockerignore file because it's a different implementation and we may not be compatible with feature of a .dockerignore.


But actually, we are using the tar package from Docker that take care of parsing the filenames to ignores. Except the read of .mesgignore, we are using Docker's package:

https://github.com/mesg-foundation/core/blob/0ff23cf04a764c4aa715730b3c6331b9512eeea1/container/build.go#L23-L29


It's true we could rename it .dockerignore. Service already have to declare a DockerFile, so they know about Docker. @antho1404 what do you think?

antho1404 commented 6 years ago

Agree to rename it .dockerignore. I wanted to have a .mesgignore for later when we will have the possibility to share the sources and stuff like that but we will add this later if it's needed and like that for now it stays simple

antho1404 commented 6 years ago

closed with https://github.com/mesg-foundation/core/pull/392