Juna190825 commited on
Commit
4d889a8
·
verified ·
1 Parent(s): 36a459a

Testing with ChromeDriver

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -2
Dockerfile CHANGED
@@ -25,6 +25,7 @@ WORKDIR /app
25
  ENV MPLCONFIGDIR=/tmp/matplotlib \
26
  XDG_CACHE_HOME=/tmp/.cache \
27
  XDG_CONFIG_HOME=/tmp/.config \
 
28
  FONTCONFIG_PATH=/etc/fonts \
29
  FONTCONFIG_FILE=/etc/fonts/fonts.conf \
30
  FONTCONFIG_CACHE=/tmp/fontconfig \
@@ -35,15 +36,18 @@ ENV MPLCONFIGDIR=/tmp/matplotlib \
35
  # Create directories with correct permissions
36
  RUN mkdir -p ${XDG_CACHE_HOME} && chmod 777 ${XDG_CACHE_HOME} \
37
  && mkdir -p ${XDG_CONFIG_HOME} && chmod 777 ${XDG_CONFIG_HOME} \
 
38
  && mkdir -p ${FONTCONFIG_CACHE} && chmod 777 ${FONTCONFIG_CACHE} \
39
- && mkdir -p /app/flagged && chmod 777 /app/flagged
 
 
 
40
 
41
  # Install Python dependencies
42
  COPY requirements.txt .
43
  RUN pip install --no-cache-dir -r requirements.txt
44
 
45
  # Install ChromeDriver
46
- # Check latest version from https://chromedriver.chromium.org/downloads
47
  RUN CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` \
48
  && wget -q https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \
49
  && unzip chromedriver_linux64.zip \
 
25
  ENV MPLCONFIGDIR=/tmp/matplotlib \
26
  XDG_CACHE_HOME=/tmp/.cache \
27
  XDG_CONFIG_HOME=/tmp/.config \
28
+ XDG_DATA_HOME=/tmp/.local/share \
29
  FONTCONFIG_PATH=/etc/fonts \
30
  FONTCONFIG_FILE=/etc/fonts/fonts.conf \
31
  FONTCONFIG_CACHE=/tmp/fontconfig \
 
36
  # Create directories with correct permissions
37
  RUN mkdir -p ${XDG_CACHE_HOME} && chmod 777 ${XDG_CACHE_HOME} \
38
  && mkdir -p ${XDG_CONFIG_HOME} && chmod 777 ${XDG_CONFIG_HOME} \
39
+ && mkdir -p ${XDG_DATA_HOME} && chmod 777 ${XDG_DATA_HOME} \
40
  && mkdir -p ${FONTCONFIG_CACHE} && chmod 777 ${FONTCONFIG_CACHE} \
41
+ && mkdir -p /app/flagged && chmod 777 /app/flagged \
42
+ && mkdir -p /tmp/.local/share/applications \
43
+ && touch /tmp/.local/share/applications/mimeapps.list \
44
+ && chmod 777 /tmp/.local/share/applications/mimeapps.list
45
 
46
  # Install Python dependencies
47
  COPY requirements.txt .
48
  RUN pip install --no-cache-dir -r requirements.txt
49
 
50
  # Install ChromeDriver
 
51
  RUN CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE` \
52
  && wget -q https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip \
53
  && unzip chromedriver_linux64.zip \