Skip to content

Commit

Permalink
[CONFIG] Docker Alpine-based images updated to Alpine 3.20
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonzalo Diaz committed Jun 6, 2024
1 parent a7b9120 commit be00a1b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM node:22.2.0-alpine3.19 AS base
###############################################################################
FROM node:22.2.0-alpine3.20 AS base

RUN apk add --update --no-cache make

ENV WORKDIR=/app
WORKDIR ${WORKDIR}

FROM node:22.2.0-alpine3.19 AS lint
###############################################################################
FROM node:20.14.0-alpine3.20 AS lint

ENV WORKDIR=/app
WORKDIR ${WORKDIR}
Expand All @@ -14,18 +16,21 @@ COPY ./src ${WORKDIR}/src
RUN apk add --update --no-cache make
RUN npm install -g markdownlint-cli

###############################################################################
FROM base AS development

###############################################################################
FROM development AS builder

COPY ./Makefile ${WORKDIR}/
COPY ./src ${WORKDIR}/src
COPY ./package.json ${WORKDIR}/package.json
COPY ./package-lock.json ${WORKDIR}/package-lock.json
COPY ./src ${WORKDIR}/src
COPY ./Makefile ${WORKDIR}/
COPY ./tsconfig.json ${WORKDIR}/tsconfig.json

RUN npm ci --verbose

###############################################################################
### In testing stage, can't use USER, due permissions issue
## in github actions environment:
##
Expand All @@ -46,6 +51,7 @@ RUN ls -alh

CMD ["npm", "run", "test"]

###############################################################################
### In production stage
## in the production phase, "good practices" such as
## WORKSPACE and USER are maintained
Expand Down

0 comments on commit be00a1b

Please sign in to comment.