-
Notifications
You must be signed in to change notification settings - Fork 22
/
grass-node.dockerfile
57 lines (47 loc) · 1.49 KB
/
grass-node.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
FROM mrcolorrain/vnc-browser:debian
# Set build arguments
ARG EXTENSION_IDS
ARG EXTENSION_URLS
ARG CRX_DOWNLOAD_URLS
# Set environment variables
# Comma-separated list of extension IDs (extension chrome webstore id)
ENV EXTENSION_IDS=${EXTENSION_IDS}
# Comma-separated list of extension URLs (app dashboard website url)
ENV EXTENSION_URLS=${EXTENSION_URLS}
# 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
# 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/*
# Copy the Supervisor configuration and Python script
COPY grass-node_main.py /app/grass-node_main.py
# Copy the entrypoint wrapper script
COPY entrypoint-wrapper.sh /app/entrypoint-wrapper.sh
RUN chmod +x /app/entrypoint-wrapper.sh
WORKDIR /app
# Expose VNC and noVNC ports
EXPOSE 5900 6080
# Use the base image's entrypoint
# ENTRYPOINT ["/app/entrypoint-wrapper.sh"]
# New base image permits entrypoint customization
ENV CUSTOMIZE=true
ENV AUTO_START_BROWSER=false
ENV AUTO_START_XTERM=false
COPY grass-node_main.py /app/custom_entrypoints_scripts