-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (28 loc) · 880 Bytes
/
Dockerfile
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
FROM alpine:latest
RUN apk --no-cache add \
nodejs \
npm \
&& npm install -g \
npm@latest \
# Cleaning up obsolete files:
&& rm -rf \
/tmp/* \
/root/.npm
WORKDIR /usr/lib/nightwatch
COPY package.json package-lock.json ./
RUN npm install --production \
# Cleaning up obsolete files:
&& rm -rf \
/tmp/* \
/root/.npm
# Set NODE_PATH to be able to require installed packages:
ENV NODE_PATH=/usr/lib/nightwatch/node_modules
# Extend path to be able to run installed binaries:
ENV PATH=$PATH:/usr/lib/nightwatch/node_modules/.bin
# Avoid permission issues with host mounts by assigning a user/group with
# uid/gid 1000 (usually the ID of the first user account on GNU/Linux):
RUN adduser -D -u 1000 nightwatch
WORKDIR /app
COPY --chown=nightwatch:nightwatch . /app/
USER nightwatch
CMD nightwatch -e ${BROWSER} --output tests-output --verbose