daniilak

Untitled

May 27th, 2022
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. FROM ubuntu:focal
  2.  
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. RUN echo "===> Installing system dependencies..."
  5. RUN BUILD_DEPS="curl unzip"
  6. RUN apt-get update && apt-get install --no-install-recommends -y unzip python curl python3-pip wget fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libnspr4 libnss3 lsb-release xdg-utils libxss1 libdbus-glib-1-2 libgbm1 $BUILD_DEPS xvfb
  7. RUN echo "===> Installing chromedriver and google-chrome..."
  8. # RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
  9. RUN wget https://chromedriver.storage.googleapis.com/102.0.5005.61/chromedriver_linux64.zip
  10. RUN unzip chromedriver_linux64.zip -d /usr/bin
  11. RUN chmod +x /usr/bin/chromedriver
  12. RUN rm chromedriver_linux64.zip
  13.  
  14. RUN wget -O google-chrome.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
  15. RUN dpkg -i google-chrome.deb
  16. RUN apt-get install -y -f
  17. RUN rm google-chrome.deb
  18. RUN echo "===> DISPLAY set..."
  19. RUN export DISPLAY=:0
  20. RUN /usr/bin/Xvfb :0 -screen 0 1024x768x24 &
  21. RUN sleep 5
  22.  
  23. RUN echo "===> Installing python dependencies..."
  24. RUN pip3 install flask Flask-Cors selenium pybase64 requests PyYAML
  25. RUN echo "===> Remove build dependencies..."
  26. RUN apt-get remove -y $BUILD_DEPS && rm -rf /var/lib/apt/lists/*
  27.  
  28.  
  29.  
  30. ENV LANG C.UTF-8
  31. ENV LC_ALL C.UTF-8
  32. ENV PYTHONUNBUFFERED=1
  33.  
  34. COPY . /app
  35.  
  36. WORKDIR /app
  37.  
  38. RUN python3 app/templates/swagger-yaml-to-html.py < app/templates/api.yaml > app/templates/doc.html
  39. RUN xvfb-run python3 app/ro.py
  40.  
  41. CMD python3 app/app.py
  42.  
Add Comment
Please, Sign In to add comment