Skip to content

Commit b01e928

Browse files
author
Gonzalo Diaz
committed
[REFACTOR] [CONFIG] [Docker] lint stage bugfix:
- yamllint config needs .gitignore - dependencies must be installed to lint code without bind/mount.
1 parent 718ff5c commit b01e928

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Dockerfile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ COPY ./.markdownlint.yaml ${WORKDIR}/
4949
# yamllint conf
5050
COPY ./.yamllint ${WORKDIR}/
5151
COPY ./.yamlignore ${WORKDIR}/
52+
COPY ./.gitignore ${WORKDIR}/
53+
54+
# Dependencies
55+
RUN npm ci --verbose --ignore-scripts
5256

5357
CMD ["make", "lint"]
5458
###############################################################################
@@ -57,12 +61,15 @@ FROM base AS development
5761
ENV WORKDIR=/app
5862
WORKDIR ${WORKDIR}
5963

64+
# Code source
6065
COPY ./src ${WORKDIR}/src
6166
COPY ./package.json ${WORKDIR}/package.json
6267
COPY ./package-lock.json ${WORKDIR}/package-lock.json
6368
COPY ./Makefile ${WORKDIR}/
6469

65-
RUN npm ci --verbose --ignore-scripts
70+
# Dependencies
71+
COPY --from=lint /app/node_modules ${WORKDIR}/node_modules
72+
6673
RUN ls -alh
6774

6875
# CMD []

0 commit comments

Comments
 (0)