Update files
Browse files- Dockerfile +6 -1
Dockerfile
CHANGED
|
@@ -7,6 +7,8 @@ RUN apt-get update && apt-get install -y \
|
|
| 7 |
curl \
|
| 8 |
firefox-esr \
|
| 9 |
fonts-dejavu \
|
|
|
|
|
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
# Create and set working directory
|
|
@@ -36,13 +38,16 @@ RUN pip install --no-cache-dir --use-deprecated=legacy-resolver -r requirements.
|
|
| 36 |
# Download geckodriver
|
| 37 |
COPY download_geckodriver.sh .
|
| 38 |
RUN chmod +x download_geckodriver.sh && ./download_geckodriver.sh
|
| 39 |
-
RUN
|
|
|
|
|
|
|
| 40 |
|
| 41 |
# Copy application
|
| 42 |
COPY . .
|
| 43 |
|
| 44 |
# Set environment variables for Selenium
|
| 45 |
ENV DISPLAY=:99
|
|
|
|
| 46 |
ENV GECKODRIVER_PATH=/app/geckodriver
|
| 47 |
ENV PATH="${PATH}:/app"
|
| 48 |
|
|
|
|
| 7 |
curl \
|
| 8 |
firefox-esr \
|
| 9 |
fonts-dejavu \
|
| 10 |
+
xvfb \
|
| 11 |
+
dbus-x11 \
|
| 12 |
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
|
| 14 |
# Create and set working directory
|
|
|
|
| 38 |
# Download geckodriver
|
| 39 |
COPY download_geckodriver.sh .
|
| 40 |
RUN chmod +x download_geckodriver.sh && ./download_geckodriver.sh
|
| 41 |
+
RUN chown -R root:root /app && \
|
| 42 |
+
chmod -R 755 /app && \
|
| 43 |
+
chmod +x /app/geckodriver
|
| 44 |
|
| 45 |
# Copy application
|
| 46 |
COPY . .
|
| 47 |
|
| 48 |
# Set environment variables for Selenium
|
| 49 |
ENV DISPLAY=:99
|
| 50 |
+
RUN Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
|
| 51 |
ENV GECKODRIVER_PATH=/app/geckodriver
|
| 52 |
ENV PATH="${PATH}:/app"
|
| 53 |
|