-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Add COPY instead of ADD in dockerfile
- Loading branch information
Showing
2 changed files
with
22 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,22 +25,22 @@ RUN set -x \ | |
|
||
WORKDIR /app | ||
|
||
ADD ./bin bin | ||
ADD ./config config | ||
ADD ./lib lib | ||
ADD ./package.json package.json | ||
ADD ./package-lock.json package-lock.json | ||
ADD ./index.ts index.ts | ||
ADD ./tsconfig.json tsconfig.json | ||
ADD ./check-node-version.js check-node-version.js | ||
COPY ./bin bin | ||
COPY ./config config | ||
COPY ./lib lib | ||
COPY ./package.json package.json | ||
COPY ./package-lock.json package-lock.json | ||
COPY ./index.ts index.ts | ||
COPY ./tsconfig.json tsconfig.json | ||
COPY ./check-node-version.js check-node-version.js | ||
Check notice Code scanning / SonarCloud Prefer COPY over ADD for copying local resources Low
Replace this ADD instruction with a COPY instruction. See more on SonarQube Cloud
|
||
|
||
RUN npm ci | ||
RUN npm run build | ||
RUN npm prune --omit=dev | ||
|
||
RUN rm -rf tsconfig.json index.ts | ||
|
||
ADD ./plugins/available/ /app/plugins/available/ | ||
COPY ./plugins/available/ /app/plugins/available/ | ||
|
||
################################################################################ | ||
FROM node:${NODE_VERSION}-bookworm-slim AS minifier | ||
|
@@ -71,8 +71,8 @@ COPY --from=minifier /app /var/app | |
|
||
ENV NODE_ENV=production | ||
|
||
ADD ./docker/scripts/entrypoint.sh /bin/entrypoint | ||
ADD ./docker/scripts/run-prod.sh /bin/kuzzle | ||
COPY ./docker/scripts/entrypoint.sh /bin/entrypoint | ||
COPY ./docker/scripts/run-prod.sh /bin/kuzzle | ||
|
||
RUN ln -s /var/app /app | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,22 @@ RUN set -x \ | |
|
||
WORKDIR /app | ||
|
||
ADD ./bin bin | ||
ADD ./config config | ||
ADD ./lib lib | ||
ADD ./package.json package.json | ||
ADD ./package-lock.json package-lock.json | ||
ADD ./index.ts index.ts | ||
ADD ./tsconfig.json tsconfig.json | ||
ADD ./check-node-version.js check-node-version.js | ||
COPY ./bin bin | ||
COPY ./config config | ||
COPY ./lib lib | ||
COPY ./package.json package.json | ||
COPY ./package-lock.json package-lock.json | ||
COPY ./index.ts index.ts | ||
COPY ./tsconfig.json tsconfig.json | ||
COPY ./check-node-version.js check-node-version.js | ||
Check notice Code scanning / SonarCloud Prefer COPY over ADD for copying local resources Low
Replace this ADD instruction with a COPY instruction. See more on SonarQube Cloud
|
||
|
||
RUN npm ci | ||
RUN npm run build | ||
RUN npm prune --omit=dev | ||
|
||
RUN rm -rf tsconfig.json index.ts | ||
|
||
ADD ./plugins/available/ plugins/available/ | ||
COPY ./plugins/available/ plugins/available/ | ||
|
||
################################################################################ | ||
FROM node:${NODE_VERSION}-bookworm-slim | ||
|
@@ -42,8 +42,8 @@ RUN set -x \ | |
&& apt-get update && apt-get install -y \ | ||
libunwind-dev | ||
|
||
ADD ./docker/scripts/entrypoint.sh /bin/entrypoint | ||
ADD ./docker/scripts/run-plugin.sh /bin/run-plugin | ||
COPY ./docker/scripts/entrypoint.sh /bin/entrypoint | ||
COPY ./docker/scripts/run-plugin.sh /bin/run-plugin | ||
|
||
COPY --from=builder /lib /lib | ||
COPY --from=builder /usr /usr | ||
|