Use up to date alpine images and not slim images
This commit is contained in:
parent
1f2c524b40
commit
6bd6280fb5
2 changed files with 6 additions and 8 deletions
12
Dockerfile
12
Dockerfile
|
@ -6,13 +6,13 @@
|
||||||
|
|
||||||
|
|
||||||
# Build project
|
# Build project
|
||||||
FROM node:12 AS builder
|
FROM node:15.5.1-alpine AS builder
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Add user
|
# Add user
|
||||||
&& addgroup --gid 10001 app \
|
&& addgroup --gid 10001 app \
|
||||||
&& adduser --disabled-password \
|
&& adduser --disabled-password \
|
||||||
--gecos '' \
|
--gecos '' \
|
||||||
--gid 10001 \
|
--ingroup app \
|
||||||
--home /app \
|
--home /app \
|
||||||
--uid 10001 \
|
--uid 10001 \
|
||||||
app
|
app
|
||||||
|
@ -26,19 +26,17 @@ RUN set -x \
|
||||||
|
|
||||||
|
|
||||||
# Main image
|
# Main image
|
||||||
FROM node:12-slim
|
FROM node:15.5.1-alpine
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Add user
|
# Add user
|
||||||
&& addgroup --gid 10001 app \
|
&& addgroup --gid 10001 app \
|
||||||
&& adduser --disabled-password \
|
&& adduser --disabled-password \
|
||||||
--gecos '' \
|
--gecos '' \
|
||||||
--gid 10001 \
|
--ingroup app \
|
||||||
--home /app \
|
--home /app \
|
||||||
--uid 10001 \
|
--uid 10001 \
|
||||||
app
|
app
|
||||||
RUN apt-get update && apt-get -y install \
|
|
||||||
git-core \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
USER app
|
USER app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --chown=app:app package*.json ./
|
COPY --chown=app:app package*.json ./
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
"cache": true
|
"cache": true
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^12.16.3"
|
"node": "^15.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.12.13",
|
"@babel/core": "^7.12.13",
|
||||||
|
|
Loading…
Reference in a new issue