erxes-api
erxes-api copied to clipboard
Change dockerfile to make full build inside container [WIP]
Currently image is built in CI-pipeline so that first steps are made outside dockerfile and only the built distribution is moved in.
That causes however problems if somebody would like to build the image without the full CI-pipeline.
This is WIP, it works already but it produces very large images.
DeepCode's analysis on #854e95 found:
- :x: 0 critical issues. :warning: 0 warnings and 0 minor issues. :heavy_check_mark: 0 issues were fixed.
:speech_balloon: This comment has been generated by the DeepCode bot, installed by the owner of the repository. The DeepCode bot protects your repository by detecting and commenting on security vulnerabilities or other critical issues.
:relaxed: If you want to provide feedback on our bot, here is how to contact us.
If you actually compare our docker images and this new image, only src directory will be copied additionally. So I don't think this new images will be fat. yarn install
& yarn build
steps are moved outside of dockerfile to use CI features such as caching.
I don't think it's good idea to add those steps back into Dockerfile
that CI uses. It'll create duplicate steps. Instead I'd suggest to create another Dockerfile
for development & custom image purposes.