diff --git a/.changeset/six-ladybugs-notice.md b/.changeset/six-ladybugs-notice.md new file mode 100644 index 000000000..65ef7b0eb --- /dev/null +++ b/.changeset/six-ladybugs-notice.md @@ -0,0 +1,12 @@ +--- +'skuba': patch +--- + +template/\*-rest-api: Avoid alternative syntax for ENV instructions + +Omitting the `=` symbol in ENV instructions [is discouraged and may be disallowed in future](https://docs.docker.com/engine/reference/builder/#env). + +```diff +- ENV NODE_ENV production ++ ENV NODE_ENV=production +``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 307f58516..98a96f11c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,7 +113,7 @@ + FROM gcr.io/distroless/nodejs:16 AS runtime + # https://nodejs.org/api/cli.html#cli_node_options_options - + ENV NODE_OPTIONS --enable-source-maps + + ENV NODE_OPTIONS=--enable-source-maps ``` For a Serverless Lambda application, update your `serverless.yml`: diff --git a/template/express-rest-api/Dockerfile b/template/express-rest-api/Dockerfile index 131346e64..a29bc103a 100644 --- a/template/express-rest-api/Dockerfile +++ b/template/express-rest-api/Dockerfile @@ -25,13 +25,13 @@ COPY --from=build /workdir/lib lib COPY --from=deps /workdir/node_modules node_modules -ENV NODE_ENV production +ENV NODE_ENV=production # https://nodejs.org/api/cli.html#cli_node_options_options -ENV NODE_OPTIONS --enable-source-maps +ENV NODE_OPTIONS=--enable-source-maps ARG PORT=8001 -ENV PORT ${PORT} +ENV PORT=${PORT} EXPOSE ${PORT} CMD ["lib/listen.js"] diff --git a/template/koa-rest-api/Dockerfile b/template/koa-rest-api/Dockerfile index ba01e4ec0..85d41ee48 100644 --- a/template/koa-rest-api/Dockerfile +++ b/template/koa-rest-api/Dockerfile @@ -25,13 +25,13 @@ COPY --from=build /workdir/lib lib COPY --from=deps /workdir/node_modules node_modules -ENV NODE_ENV production +ENV NODE_ENV=production # https://nodejs.org/api/cli.html#cli_node_options_options -ENV NODE_OPTIONS --enable-source-maps +ENV NODE_OPTIONS=--enable-source-maps ARG PORT=8001 -ENV PORT ${PORT} +ENV PORT=${PORT} EXPOSE ${PORT} CMD ["--require", "./lib/tracing.js", "./lib/listen.js"]