Dockerfile 1.3 KB

12345678910111213141516171819202122232425
  1. # I'd like to use 24.04 and use the default ubuntu user here...
  2. FROM ubuntu:22.04
  3. # From chromium site, these are the required libs
  4. # for google chrome for testing to run.
  5. RUN apt update -y && \
  6. apt upgrade -y && \
  7. apt install -y "libasound2" "libatk-bridge2.0-0" "libatk1.0-0" "libatspi2.0-0" "libc6" "libcairo2" "libcups2" "libdbus-1-3" "libdrm2" "libexpat1" "libgbm1" "libglib2.0-0" "libnspr4" "libnss3" "libpango-1.0-0" "libpangocairo-1.0-0" "libstdc++6" "libudev1" "libuuid1" "libx11-6" "libx11-xcb1" "libxcb-dri3-0" "libxcb1" "libxcomposite1" "libxcursor1" "libxdamage1" "libxext6" "libxfixes3" "libxi6" "libxkbcommon0" "libxrandr2" "libxrender1" "libxshmfence1" "libxss1" "libxtst6" && \
  8. apt install -y libxml2 libxslt1.1 libffi8 unzip && \
  9. groupadd -g 1000 ubuntu && \
  10. useradd -rm -d /home/ubuntu -s /bin/bash -u 1000 -g ubuntu -m ubuntu
  11. # Add google chrome testing to the path.
  12. ENV PATH="/home/ubuntu/bin:${PATH}"
  13. # Activate user
  14. USER ubuntu
  15. WORKDIR /home/ubuntu
  16. ADD --chown=1000:1000 ./bin/ /home/ubuntu/bin/
  17. # CMD ["chromedriver", "--port=9515", "--whitelisted-ips", "--log-level=INFO"]
  18. CMD ["chromedriver", "--port=9515", "--whitelisted-ips", "--log-level=WARNING"]
  19. # Is it working? This shows you the activity...
  20. # CMD ["chromedriver", "--port=9515", "--verbose", "--whitelisted-ips"]