forked from vvo/docker-selenium-firefox-chrome-beta
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAlpine.dockerfile
42 lines (30 loc) · 1.08 KB
/
Alpine.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
38
39
40
41
42
FROM openjdk:8-jre-alpine
ENV NODE_VERSION 8.11.2
LABEL maintainer="Vincent Voyer <[email protected]>"
LABEL description="Docker container for running https://github.com/vvo/selenium-standalone to start the Selenium \
server and has the latest stable Chrome and Firefox browsers. \
You can use this container by extending it for use in your own repository where you run E2E tests."
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.4/main" >> /etc/apk/repositories && \
echo "http://dl-4.alpinelinux.org/alpine/v3.4/community" >> /etc/apk/repositories
RUN apk update
RUN apk add --update \
nodejs \
nodejs-npm \
curl \
sudo
RUN node --version
RUN npm --version
RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node
RUN echo 'node ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
WORKDIR /home/node
COPY package.json .
RUN mkdir node_modules
RUN chown node:node -R .
RUN chmod 777 -R .
RUN ls -al .
USER node
RUN npm install
RUN ls -al ./node_modules/selenium-standalone/
RUN ls -al ./node_modules/selenium-standalone/.selenium
ENTRYPOINT ["npm", "run", "selenium"]