|
| 1 | +FROM ubuntu:22.04 AS build |
| 2 | + |
| 3 | +# Install packaged dependencies |
| 4 | +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ |
| 5 | + build-essential git curl cmake gcc g++ pkg-config libmagic-dev \ |
| 6 | + libssl-dev zlib1g-dev ca-certificates |
| 7 | + |
| 8 | +# Install the stable toolchain with rustup |
| 9 | +RUN curl https://sh.rustup.rs >/tmp/rustup-init && \ |
| 10 | + chmod +x /tmp/rustup-init && \ |
| 11 | + /tmp/rustup-init -y --no-modify-path --default-toolchain stable --profile minimal |
| 12 | +ENV PATH=/root/.cargo/bin:$PATH |
| 13 | + |
| 14 | +RUN apt-get update && apt-get install -y \ |
| 15 | + ca-certificates \ |
| 16 | + curl \ |
| 17 | + docker.io \ |
| 18 | + gcc \ |
| 19 | + git \ |
| 20 | + libssl-dev \ |
| 21 | + pkg-config \ |
| 22 | + xz-utils |
| 23 | + |
| 24 | +# Install dependencies for chromium browser |
| 25 | +RUN apt-get install -y \ |
| 26 | + gconf-service \ |
| 27 | + libasound2 \ |
| 28 | + libatk1.0-0 \ |
| 29 | + libatk-bridge2.0-0 \ |
| 30 | + libc6 \ |
| 31 | + libcairo2 \ |
| 32 | + libcups2 \ |
| 33 | + libdbus-1-3 \ |
| 34 | + libexpat1 \ |
| 35 | + libfontconfig1 \ |
| 36 | + libgbm-dev \ |
| 37 | + libgcc1 \ |
| 38 | + libgconf-2-4 \ |
| 39 | + libgdk-pixbuf2.0-0 \ |
| 40 | + libglib2.0-0 \ |
| 41 | + libgtk-3-0 \ |
| 42 | + libnspr4 \ |
| 43 | + libpango-1.0-0 \ |
| 44 | + libpangocairo-1.0-0 \ |
| 45 | + libstdc++6 \ |
| 46 | + libx11-6 \ |
| 47 | + libx11-xcb1 \ |
| 48 | + libxcb1 \ |
| 49 | + libxcomposite1 \ |
| 50 | + libxcursor1 \ |
| 51 | + libxdamage1 \ |
| 52 | + libxext6 \ |
| 53 | + libxfixes3 \ |
| 54 | + libxi6 \ |
| 55 | + libxrandr2 \ |
| 56 | + libxrender1 \ |
| 57 | + libxss1 \ |
| 58 | + libxtst6 \ |
| 59 | + fonts-liberation \ |
| 60 | + libappindicator1 \ |
| 61 | + libnss3 \ |
| 62 | + lsb-release \ |
| 63 | + xdg-utils \ |
| 64 | + wget |
| 65 | + |
| 66 | +# Install rust |
| 67 | +RUN curl https://sh.rustup.rs -sSf | bash -s -- -y --default-toolchain nightly --no-modify-path --profile minimal |
| 68 | +ENV PATH="/root/.cargo/bin:${PATH}" |
| 69 | + |
| 70 | +RUN curl -sL https://nodejs.org/dist/v14.4.0/node-v14.4.0-linux-x64.tar.xz | tar -xJ |
| 71 | +ENV PATH="/node-v14.4.0-linux-x64/bin:${PATH}" |
| 72 | +ENV NODE_PATH="/node-v14.4.0-linux-x64/lib/node_modules/" |
| 73 | + |
| 74 | +WORKDIR /build |
| 75 | + |
| 76 | +RUN mkdir out |
| 77 | + |
| 78 | +# For now, we need to use `--unsafe-perm=true` to go around an issue when npm tries |
| 79 | +# to create a new folder. For reference: |
| 80 | +# https://github.com/puppeteer/puppeteer/issues/375 |
| 81 | +# |
| 82 | +# We also specify the version in case we need to update it to go around cache limitations. |
| 83 | +RUN npm install -g [email protected] --unsafe-perm=true |
| 84 | + |
| 85 | +EXPOSE 3000 |
| 86 | + |
| 87 | +CMD ["node", "/build/out/gui-tests/tester.js"] |
0 commit comments