backend/e2e/Dockerfile (view raw)
1FROM alpine:3.11
2
3RUN echo '@edgetesting http://dl-cdn.alpinelinux.org/alpine/edge/testing' \
4 >> /etc/apk/repositories
5
6RUN apk --no-cache add \
7 nodejs \
8 npm \
9 ffmpeg \
10 android-tools@edgetesting \
11 && npm install -g \
12 npm@latest \
13 # Clean up obsolete files:
14 && rm -rf \
15 /tmp/* \
16 /root/.npm
17
18WORKDIR /usr/lib/wdio
19COPY package.json package-lock.json ./
20RUN npm install --production \
21 # Clean up obsolete files:
22 && rm -rf \
23 /tmp/* \
24 /root/.npm
25# Set NODE_PATH to be able to require installed packages:
26ENV NODE_PATH=/usr/lib/wdio/node_modules
27# Extend path to be able to run installed binaries:
28ENV PATH=$PATH:/usr/lib/wdio/node_modules/.bin
29
30# Avoid permission issues with host mounts by assigning a user/group with
31# uid/gid 1000 (usually the ID of the first user account on GNU/Linux):
32RUN adduser -D -u 1000 wdio
33
34USER wdio
35
36WORKDIR /opt
37
38COPY bin/wait-for-hosts.sh /usr/local/bin/wait-for-hosts
39
40ENTRYPOINT ["wait-for-hosts", "--", "wdio"]