-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
62 lines (39 loc) · 1.57 KB
/
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
FROM debian:buster
# --- GENERAL DEPENDENCIES
# general dependencies installation
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
dumb-init \
gnupg \
nano
# --- CHROME -----------------------------------
# Adding repo for chrome
RUN curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
# Chrome installation
RUN apt-get update && apt-get install -y --no-install-recommends google-chrome-stable
# Adds chrome user
RUN groupadd -r chrome && useradd -r -g chrome -G audio,video chrome
# --- NODEJS -----------------------------------------
# Adding repo for nodejs
RUN curl -sSL https://deb.nodesource.com/setup_12.x | bash -
# nodejs installation
RUN apt-get update && apt-get install -y --no-install-recommends nodejs
# --- LIGHTHOUSE ------------------------------------
# lighthouse installation
RUN npm install -g lighthouse
# --- LIGHTKEEPER -----------------------------------
# Copy sources
COPY ./ /lightkeeper
RUN chmod +x /lightkeeper/lightkeeper
# npm dependencies
RUN cd /lightkeeper && npm install
# Adds to path
ENV PATH="/lightkeeper:${PATH}"
# --- CONTAINER --------------------------------------
# Set current workdir
WORKDIR /lightkeeper
# default command
CMD ["dumb-init", "lightkeeper"]