ad build arg for base images
This commit is contained in:
parent
8639c17880
commit
7d0e15e9b8
@ -53,6 +53,9 @@ steps:
|
|||||||
repo: ocram85/blog
|
repo: ocram85/blog
|
||||||
tags: "next"
|
tags: "next"
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
build_args:
|
||||||
|
- NODE_BASE=lts-buster-slim
|
||||||
|
- NGINX_BASE=1.21.6-alpine
|
||||||
|
|
||||||
- name: "Trivy (next)"
|
- name: "Trivy (next)"
|
||||||
image: aquasec/trivy
|
image: aquasec/trivy
|
||||||
@ -111,6 +114,9 @@ steps:
|
|||||||
repo: ocram85/blog
|
repo: ocram85/blog
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
build_args:
|
||||||
|
- NODE_BASE=lts-buster-slim
|
||||||
|
- NGINX_BASE=1.21.6-alpine
|
||||||
|
|
||||||
- name: "Trivy (latest)"
|
- name: "Trivy (latest)"
|
||||||
image: aquasec/trivy
|
image: aquasec/trivy
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
FROM node:lts-buster-slim as builder
|
# Build ARGS for base image versions
|
||||||
|
ARG NODE_BASE=lts-buster-slim
|
||||||
|
ARG NGINX_BASE=1.21.6-alpine
|
||||||
|
|
||||||
|
FROM node:${NODE_BASE} as builder
|
||||||
COPY . /src
|
COPY . /src
|
||||||
#RUN ls -la
|
#RUN ls -la
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
@ -6,7 +10,7 @@ WORKDIR /src
|
|||||||
RUN npm install \
|
RUN npm install \
|
||||||
&& npm run build
|
&& npm run build
|
||||||
|
|
||||||
FROM nginx:1.21.6-alpine as prod
|
FROM nginx:${NGINX_BASE} as prod
|
||||||
LABEL maintainer="marco.blessing@googlemail.com"
|
LABEL maintainer="marco.blessing@googlemail.com"
|
||||||
HEALTHCHECK --interval=15s --timeout=5s \
|
HEALTHCHECK --interval=15s --timeout=5s \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
CMD wget --no-verbose --tries=1 --spider http://localhost:80/ || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user