File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 1
1
ARG NODE_JS_VERSION=20
2
2
FROM node:${NODE_JS_VERSION}
3
3
4
- ARG BUILDER_UID=1000
5
- ARG BUILDER_GID=1000
6
- ENV BUILDER_USER elastic
7
- ENV BUILDER_GROUP elastic
8
-
9
4
# install zip util
10
5
RUN apt-get clean -y && \
11
6
apt-get update -y && \
12
7
apt-get install -y zip
13
8
14
9
# Set user permissions and directory
15
- RUN groupadd --system -g ${BUILDER_GID} ${BUILDER_GROUP} \
16
- && useradd --system --shell /bin/bash -u ${BUILDER_UID} -g ${BUILDER_GROUP} -m elastic 1>/dev/null 2>/dev/null \
17
- && mkdir -p /usr/src/app \
18
- && chown -R ${BUILDER_USER}:${BUILDER_GROUP} /usr/src/
19
10
WORKDIR /usr/src/app
20
- USER ${BUILDER_USER}:${BUILDER_GROUP}
21
11
22
12
# Install app dependencies
23
- COPY --chown=$BUILDER_USER:$BUILDER_GROUP package*.json ./
13
+ COPY package*.json ./
24
14
RUN npm install
25
15
26
- COPY --chown=$BUILDER_USER:$BUILDER_GROUP . .
16
+ COPY . .
You can’t perform that action at this time.
0 commit comments