Fix Dockerfile stage references for clarity and correct build context
Some checks failed
Building and publishing Homebrewery as Docker Image / build (release) Failing after 31m38s
Some checks failed
Building and publishing Homebrewery as Docker Image / build (release) Failing after 31m38s
This commit is contained in:
parent
ffab318254
commit
4b6efcea6e
10
Dockerfile
10
Dockerfile
@ -1,24 +1,24 @@
|
|||||||
# Base Stage for NodeJS
|
# Base Stage for NodeJS
|
||||||
FROM node:22-alpine as base
|
FROM node:22-alpine AS base
|
||||||
|
|
||||||
ENV NODE_ENV=docker
|
ENV NODE_ENV=docker
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Installing dependencies with use of package-lock.json
|
# Installing dependencies with use of package-lock.json
|
||||||
FROM base as deps
|
FROM base AS deps
|
||||||
|
|
||||||
RUN apk --no-cache add git
|
RUN apk --no-cache add git
|
||||||
COPY homebrewery/package.json homebrewery/package-lock.json ./
|
COPY homebrewery/package.json homebrewery/package-lock.json ./
|
||||||
RUN npm ci --ignore-scripts
|
RUN npm ci --ignore-scripts
|
||||||
|
|
||||||
# Build Stage
|
# Build Stage
|
||||||
FROM base as builder
|
FROM base AS builder
|
||||||
|
|
||||||
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
||||||
COPY homebrewery/ ./
|
COPY homebrewery/ ./
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
FROM base as runner
|
FROM base AS runner
|
||||||
|
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ARG REVISION
|
ARG REVISION
|
||||||
@ -48,7 +48,7 @@ RUN chmod +x /entrypoint.sh
|
|||||||
|
|
||||||
# Adding executables
|
# Adding executables
|
||||||
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
COPY --from=deps /usr/src/app/node_modules ./node_modules
|
||||||
COPY --from=deps /usr/src/app/build ./build
|
COPY --from=builder /usr/src/app/build ./build
|
||||||
COPY homebrewery/ ./
|
COPY homebrewery/ ./
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
Loading…
x
Reference in New Issue
Block a user