critical icon indicating copy to clipboard operation
critical copied to clipboard

Official docker image

Open sheerun opened this issue 7 years ago • 6 comments

Critica's requirements and size is pretty substantial, could you prepare official dockerfile so everyone doesn't need to re-run build of it? Following would be perfect:

FROM node:8

RUN apt-get update && apt-get install -y libnss3 libxss1 libasound2 libpangocairo-1.0-0 libx11-xcb-dev libxcomposite1 libxcursor1 libxdamage1 libxi6 libxtst6 libcups2 libxrandr-dev libgconf-2-4 libatk1.0-0 libgtk-3-0

RUN npm install -g yarn

RUN yarn global add [email protected]

And tag it like critical:1.1.0

This way one would be able to install critical extremely quickly with yarn --prefer-offline within docker.

sheerun avatar Dec 09 '17 22:12 sheerun

I totally agree with this

zomars avatar Jan 19 '18 00:01 zomars

In case anyone trips over this page, it looks like @sheerun has built out a docker image: sheerun/critical Which is working well for us. Thanks!! I agree that an image appropriately documented as part of this project would be better, but this will get us a long way.

gbowne-quickbase avatar Sep 13 '19 15:09 gbowne-quickbase

I've just upgraded this image to node 10 and critical 1.3.6

sheerun avatar Sep 13 '19 16:09 sheerun

Hello, is the docker image still available? I'm running gulp in a docker container and currently I have an error that says, (node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to launch chrome! spawn /tmp/app/node_modules/puppeteer/.local-chromium/linux-637110/chrome-linux/chrome ENOENT. I'm wondering if the docker image will resolve this issue.

gablittledevshop avatar Oct 07 '19 20:10 gablittledevshop

Hi, does anyone know how to make it run from a src (URL_FROM_MY_LOCAL_DOCKER), from a local docker instance?

generate({
  inline: true,
  base: 'test/',
  src: URL_FROM_MY_LOCAL_DOCKER
  target: 'index-critical.html',
  width: 1300,
  height: 900,
});

dmezquiam avatar Oct 26 '22 13:10 dmezquiam

I created a new docker image and opened a pull request.

Check out #550 and https://github.com/tmaier/critical/pkgs/container/critical

tmaier avatar Jan 17 '23 21:01 tmaier