generated from DTS-STN/next-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
DockerfileTest
47 lines (38 loc) · 1.04 KB
/
DockerfileTest
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
35
36
37
38
39
40
41
42
43
44
45
46
47
#
# To run this file enter on the terminal:
# docker build --file DockerfileTest .
#
FROM node:16.15.1-alpine AS production
# test = test uses legalValuesJson_test.json to run the all the tests
ENV NODE_ENV=test
SHELL ["/bin/sh", "-c"]
RUN apk add --no-cache bash
ARG user=joker
ARG home=/home/node
ARG group=thejokers
ARG ADOBE_ANALYTICS_URL
# ARG NEXTAUTH_URL this ones are not necessary to run api tests
# ARG NEXTAUTH_SECRET
# ARG NEXT_AUTH_USERNAME
# ARG NEXT_AUTH_PASSWORD
ARG APP_ENV
ARG LOGGING_LEVEL
RUN addgroup -S $group
RUN adduser \
--disabled-password \
--gecos "" \
--home $home \
--ingroup $group \
$user
ENV LOGGING_LEVEL=$LOGGING_LEVEL
ENV APP_ENV=development
ENV ADOBE_ANALYTICS_URL=$ADOBE_ANALYTICS_URL
# ENV NEXTAUTH_URL=$NEXTAUTH_URL
# ENV NEXTAUTH_SECRET=$NEXTAUTH_SECRET
# ENV NEXT_AUTH_USERNAME=$NEXT_AUTH_USERNAME
# ENV NEXT_AUTH_PASSWORD=$NEXT_AUTH_PASSWORD
WORKDIR $home
COPY --chown=55:$group . .
RUN yarn install --immutable
#RUN yarn run test:unit gisCoupleOnePenBenefit
RUN yarn run test:unit