refactor: optimize docker image building

This commit is contained in:
Michel Jonathan Schmitz
2019-07-15 13:26:58 +02:00
parent 355da9e8c4
commit 46cc4b87a0
2 changed files with 13 additions and 3 deletions

10
.dockerignore Normal file
View File

@@ -0,0 +1,10 @@
# Exclude the following directories, when copying into an image
.git
.gitlab
.nyc_output
.vscode
coverage
# Exclude the following files, when copying into an image
.gitignore
.gitlab-ci.yml

View File

@@ -1,8 +1,8 @@
FROM registry.gitlab.com/openstapps/projectmanagement/node
ADD . /minimal-connector
WORKDIR /minimal-connector
ENTRYPOINT ["node", "lib/cli.js", "run", "--"]
CMD [""]
CMD [""]
# Add connector as last step to reuse layers effectively
ADD . /minimal-connector