Skip to content

Commit dcc5a75

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 f8f498a commit dcc5a75

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
@@ -48,6 +48,10 @@ COPY ./.markdownlint.yaml ${WORKDIR}/
4848
# yamllint conf
4949
COPY ./.yamllint ${WORKDIR}/
5050
COPY ./.yamlignore ${WORKDIR}/
51+
COPY ./.gitignore ${WORKDIR}/
52+
53+
# Dependencies
54+
RUN npm ci --verbose --ignore-scripts
5155

5256
CMD ["make", "lint"]
5357

@@ -57,14 +61,17 @@ 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
COPY ./tsconfig.json ${WORKDIR}/tsconfig.json
6570
COPY ./tsconfig.prod.json ${WORKDIR}/tsconfig.prod.json
6671

67-
RUN npm ci --verbose --ignore-scripts
72+
# Dependencies
73+
COPY --from=lint /app/node_modules ${WORKDIR}/node_modules
74+
6875
RUN ls -alh
6976

7077
# CMD []

0 commit comments

Comments
 (0)