Giter Site home page Giter Site logo

Comments (2)

michmerr avatar michmerr commented on July 19, 2024

I'm wondering the same thing. What's the point of a browsers convenience image with no pre-installed browsers?

from cimg-node.

bruno-salapic avatar bruno-salapic commented on July 19, 2024

i figured out a way that doesnt involve using the circleci, pretty much looks like this

FROM node:18 AS browsers

RUN apt-get update &&
# Google Chrome deps
# Some of these packages should be pulled into their own section
apt-get install -y --no-install-recommends --no-upgrade
fonts-liberation
libappindicator3-1
libasound2
libatk-bridge2.0-0
libatspi2.0-0
libcairo2
libcups2
libu2f-udev
libgbm1
libgdk-pixbuf2.0-0
libgtk-3-0
libpango-1.0-0
libpangocairo-1.0-0
libxcursor1
libxss1
xdg-utils
libnspr4
libnss3
libvulkan1
xvfb
&&
rm -rf /var/lib/apt/lists/*

RUN curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
RUN apt-get install -y ./google-chrome-stable_current_amd64.deb
RUN rm google-chrome-stable_current_amd64.deb

RUN echo "Chrome: " && google-chrome --version

RUN echo 'alias chrome="/runner/framework/google-chrome"' >> ~/.bashrc

ENV DISPLAY=":99"
RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint &&
chmod +x /tmp/entrypoint &&
mv /tmp/entrypoint /docker-entrypoint.sh

ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["/bin/sh"]

FROM browsers AS final
#rest of the docker container stuff you want to execute goes here

from cimg-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.