minor dockerfile syntax update

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-08-21 08:34:29 +02:00
parent 1266371646
commit 019d9ad3b3
10 changed files with 23 additions and 17 deletions
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/create-app': patch
'@backstage/plugin-devtools': patch
---
Minor dockerfile syntax update
@@ -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
@@ -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
@@ -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
+2 -2
View File
@@ -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"]
```
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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
@@ -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,
+1 -1
View File
@@ -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 ./