forked from rudderlabs/rudder-transformer
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile-ut-func
34 lines (25 loc) · 909 Bytes
/
Dockerfile-ut-func
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# syntax=docker/dockerfile:1.4
FROM ubuntu:20.04
RUN apt-get update \
&& apt-get install -y curl make g++ \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists.d/* \
&& apt-get autoremove \
&& apt-get clean \
&& apt-get autoclean
RUN adduser --disabled-password --gecos "" --uid 1000 node
RUN mkdir -p /home/node/app/node_modules && chown -R node:node /home/node/app && mkdir -p /home/node/.npm && chown -R node:node /home/node/.npm
# Create app directory
WORKDIR /home/node/app
USER node
ARG version
ENV transformer_build_version=$version
COPY package*.json ./
RUN npm install
COPY --chown=node:node . .
HEALTHCHECK --interval=1s --timeout=30s --retries=30 \
CMD wget --no-verbose --tries=5 --spider http://localhost:9090/health || exit 1
CMD [ "npm", "start" ]
EXPOSE 9090/tcp