-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathgrass.dockerfile
51 lines (44 loc) · 1.51 KB
/
grass.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
FROM debian:stable-slim
# Set environment variables
ENV EXTENSION_ID=ilehaonighjijnmpnagapkhpcdbhclfg
ENV EXTENSION_URL='https://app.getgrass.io/'
ENV CRX_DOWNLOAD_URLS='https://chromewebstore.google.com/detail/grass-lite-node/ilehaonighjijnmpnagapkhpcdbhclfg'
ENV GIT_USERNAME=sryze
ENV GIT_REPO=crx-dl
# Comma-separated list of extension IDs (extension chrome webstore id)
ENV EXTENSION_IDS=${EXTENSION_ID}
# Comma-separated list of extension URLs (app dashboard website url)
ENV EXTENSION_URLS=${EXTENSION_URL}
# Comma-separated list of CRX download URLs (either direct URLs or Chrome Web Store URLs)
ENV CRX_DOWNLOAD_URLS=${CRX_DOWNLOAD_URLS}
# In case of error multiply all backoff-timings of this value
ENV MAX_RETRY_MULTIPLIER=3
# Enable headless mode
ENV HEADLESS=true
# Install necessary packages then clean up to reduce image size
RUN set -e; \
apt update && \
apt upgrade -y && \
apt install -qqy \
curl \
wget \
git \
chromium \
chromium-driver \
python3 \
python3-requests \
python3-selenium \
coreutils \
bash && \
apt autoremove --purge -y && \
apt clean && \
rm -rf /var/lib/apt/lists/*
# # Download crx downloader from git
# RUN git clone "https://github.com/${GIT_USERNAME}/${GIT_REPO}.git" && \
# chmod +x ./${GIT_REPO}/crx-dl.py
# # Download the extension selected
# RUN python3 ./${GIT_REPO}/crx-dl.py $EXTENSION_ID
# Install python requirements
COPY grass_main.py .
# RUN pip install -r requirements.txt
ENTRYPOINT [ "python3", "grass_main.py" ]