assets
This commit is contained in:
1 parent
2cb803948c
commit
4eb2f0bee3
1 file changed
+36
@@ -24,3 +24,39 @@ COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
# syntax=docker/dockerfile:1.6
|
||||
|
||||
ARG NODE_VERSION=20
|
||||
|
||||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-slim AS build
|
||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Assets-only image: no web server. Contains built files at /dist.
|
||||
FROM --platform=$TARGETPLATFORM busybox:stable
|
||||
WORKDIR /
|
||||
COPY --from=build /app/dist /dist
|
||||
COPY env.sh /env.sh
|
||||
RUN chmod +x /env.sh
|
||||
# No CMD provided intentionally — this image is for copying/volume population.
|
||||
# syntax=docker/dockerfile:1.6
|
||||
|
||||
ARG NODE_VERSION=20
|
||||
|
||||
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-slim AS build
|
||||
ENV NODE_OPTIONS="--max-old-space-size=4096"
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Assets-only image: no web server. Contains built files at /dist.
|
||||
FROM --platform=$TARGETPLATFORM busybox:stable
|
||||
WORKDIR /
|
||||
COPY --from=build /app/dist /dist
|
||||
# No CMD provided intentionally — this image is for copying/volume population.
|
||||
Reference in new issue
Block a user