diff --git a/.changeset/giant-jars-mix.md b/.changeset/giant-jars-mix.md new file mode 100644 index 0000000000..652e23a280 --- /dev/null +++ b/.changeset/giant-jars-mix.md @@ -0,0 +1,6 @@ +--- +'@backstage/create-app': patch +'@backstage/plugin-devtools': patch +--- + +Minor dockerfile syntax update diff --git a/contrib/docker/frontend-with-nginx/Dockerfile.dockerbuild b/contrib/docker/frontend-with-nginx/Dockerfile.dockerbuild index 053b4fb492..fa8e42482b 100644 --- a/contrib/docker/frontend-with-nginx/Dockerfile.dockerbuild +++ b/contrib/docker/frontend-with-nginx/Dockerfile.dockerbuild @@ -55,4 +55,4 @@ COPY docker/default.conf.template /etc/nginx/templates/default.conf.template COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh -ENV PORT 80 +ENV PORT=80 diff --git a/contrib/docker/frontend-with-nginx/Dockerfile.hostbuild b/contrib/docker/frontend-with-nginx/Dockerfile.hostbuild index f0fa4a034b..b07d02c0c8 100644 --- a/contrib/docker/frontend-with-nginx/Dockerfile.hostbuild +++ b/contrib/docker/frontend-with-nginx/Dockerfile.hostbuild @@ -36,4 +36,4 @@ COPY docker/default.conf.template /etc/nginx/templates/default.conf.template COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh -ENV PORT 80 +ENV PORT=80 diff --git a/contrib/docker/minimal-hardened-image/Dockerfile b/contrib/docker/minimal-hardened-image/Dockerfile index a247e0dff1..b9435aa8af 100644 --- a/contrib/docker/minimal-hardened-image/Dockerfile +++ b/contrib/docker/minimal-hardened-image/Dockerfile @@ -23,8 +23,8 @@ RUN --mount=type=cache,target=/home/nonroot/.cache/pip,uid=65532,gid=65532 \ # Build Node environment in a separate builder stage FROM cgr.dev/chainguard/wolfi-base:latest as node-builder -ENV NODE_VERSION 20=~20.11 -ENV NODE_ENV production +ENV NODE_VERSION="20=~20.11" +ENV NODE_ENV=production RUN --mount=type=cache,target=/var/cache/apk,sharing=locked,uid=65532,gid=65532 \ --mount=type=cache,target=/var/lib/apk,sharing=locked,uid=65532,gid=65532 \ @@ -52,20 +52,20 @@ RUN --mount=type=cache,target=/home/nonroot/.yarn/berry/cache,sharing=locked,uid # Final stage to build the application image FROM cgr.dev/chainguard/wolfi-base:latest -ENV PYTHON_VERSION 3.12=~3.12 -ENV NODE_VERSION 20=~20.14 -ENV NODE_ENV production +ENV PYTHON_VERSION="3.12=~3.12" +ENV NODE_VERSION="20=~20.14" +ENV NODE_ENV=production RUN --mount=type=cache,target=/var/cache/apk,sharing=locked,uid=65532,gid=65532 \ --mount=type=cache,target=/var/lib/apk,sharing=locked,uid=65532,gid=65532 \ apk update && \ apk add \ # add node for backstage - nodejs-$NODE_VERSION \ + nodejs-$NODE_VERSION \ # add python for backstage techdocs - python-$PYTHON_VERSION \ + python-$PYTHON_VERSION \ # add tini for init process - tini + tini WORKDIR /app diff --git a/docs/deployment/docker.md b/docs/deployment/docker.md index 897498d28f..7b71c2eb61 100644 --- a/docs/deployment/docker.md +++ b/docs/deployment/docker.md @@ -81,7 +81,7 @@ USER node WORKDIR /app # This switches many Node.js dependencies to production mode. -ENV NODE_ENV production +ENV NODE_ENV=production # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. # The skeleton contains the package.json of each package in the monorepo, @@ -263,7 +263,7 @@ COPY --chown=node:node app-config*.yaml ./ COPY --chown=node:node examples ./examples # This switches many Node.js dependencies to production mode. -ENV NODE_ENV production +ENV NODE_ENV=production CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] ``` diff --git a/docs/deployment/flightcontrol.md b/docs/deployment/flightcontrol.md index 5d59371b47..14e0b308a6 100644 --- a/docs/deployment/flightcontrol.md +++ b/docs/deployment/flightcontrol.md @@ -68,7 +68,7 @@ USER node WORKDIR /app # This switches many Node.js dependencies to production mode. -ENV NODE_ENV production +ENV NODE_ENV=production # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. # The skeleton contains the package.json of each package in the monorepo, diff --git a/docs/tutorials/yarn-migration.md b/docs/tutorials/yarn-migration.md index bc5980b2f5..5c87125277 100644 --- a/docs/tutorials/yarn-migration.md +++ b/docs/tutorials/yarn-migration.md @@ -85,7 +85,7 @@ FROM node:16-bullseye-slim # highlight-add-start # Set Python interpreter for `node-gyp` to use -ENV PYTHON /usr/bin/python3 +ENV PYTHON=/usr/bin/python3 # highlight-add-end # Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, diff --git a/packages/backend/Dockerfile b/packages/backend/Dockerfile index e0e6ab8a31..b64a26afad 100644 --- a/packages/backend/Dockerfile +++ b/packages/backend/Dockerfile @@ -35,7 +35,7 @@ USER node # This switches many Node.js dependencies to production mode. -ENV NODE_ENV production +ENV NODE_ENV=production # Copy over Yarn 3 configuration, release, and plugins COPY --chown=node:node .yarn ./.yarn diff --git a/packages/create-app/templates/default-app/packages/backend/Dockerfile b/packages/create-app/templates/default-app/packages/backend/Dockerfile index bef67b5ce7..22fe721379 100644 --- a/packages/create-app/templates/default-app/packages/backend/Dockerfile +++ b/packages/create-app/templates/default-app/packages/backend/Dockerfile @@ -34,7 +34,7 @@ USER node WORKDIR /app # This switches many Node.js dependencies to production mode. -ENV NODE_ENV production +ENV NODE_ENV=production # Copy repo skeleton first, to avoid unnecessary docker cache invalidation. # The skeleton contains the package.json of each package in the monorepo, diff --git a/plugins/devtools/README.md b/plugins/devtools/README.md index ca9b436acc..fef51626ad 100644 --- a/plugins/devtools/README.md +++ b/plugins/devtools/README.md @@ -20,7 +20,7 @@ You may need to modify your Dockerfile to ensure `backstage.json` is copied into ```sh WORKDIR /app # This switches many Node.js dependencies to production mode. -ENV NODE_ENV production +ENV NODE_ENV=production # Then copy the rest of the backend bundle, along with any other files we might want (including backstage.json). COPY --chown=node:node ... backstage.json ./