|
| 1 | +ARG CLI_VERSION=2.10 |
| 2 | +ARG PHP_VERSION=php7.3 |
| 3 | +# Extend the Docksal CLI per https://docs.docksal.io/stack/extend-images/ |
| 4 | +FROM docksal/cli:${CLI_VERSION}-${PHP_VERSION} |
| 5 | + |
| 6 | +# Puppeteer dependencies taken from https://github.com/alekzonder/docker-puppeteer |
| 7 | +# Install addtional apt packages needed for pa11y and puppeteer |
| 8 | +# Added vim. |
| 9 | +RUN apt-get update && \ |
| 10 | + apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ |
| 11 | + libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ |
| 12 | + libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ |
| 13 | + libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ |
| 14 | + fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst \ |
| 15 | + ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget vim && \ |
| 16 | + apt-get --purge remove && \ |
| 17 | + apt-get clean && apt-get autoremove -y && rm -rf /var/lib/apt/lists/* |
| 18 | + |
| 19 | +ARG HELM_VERSION=v2.12.3 |
| 20 | + |
| 21 | +# Next install tools from phase2/docker-gitlab-ci-workspace |
| 22 | +RUN curl -o /usr/local/bin/kubectl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ |
| 23 | + chmod +x /usr/local/bin/kubectl && \ |
| 24 | + curl -o ./install_helm.sh https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get && \ |
| 25 | + chmod +x ./install_helm.sh && \ |
| 26 | + ./install_helm.sh -v ${HELM_VERSION} && \ |
| 27 | + helm init --client-only |
| 28 | + |
| 29 | +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ |
| 30 | + python get-pip.py && \ |
| 31 | + pip install awscli |
| 32 | + |
| 33 | +# All further commands will be performed as the docker user. |
| 34 | +USER docker |
| 35 | +SHELL ["/bin/bash", "-c"] |
| 36 | + |
| 37 | +# Remove ruby from Docksal CLI |
| 38 | +RUN \ |
| 39 | + # Initialize the user environment (this loads rvm) |
| 40 | + . $HOME/.profile && \ |
| 41 | + rvm remove ruby-${RUBY_VERSION_INSTALL} |
| 42 | + |
| 43 | +# Install additional global npm dependencies |
| 44 | +RUN \ |
| 45 | + # Initialize the user environment (this loads nvm) |
| 46 | + . $HOME/.profile && \ |
| 47 | + # Install node packages |
| 48 | + npm install -g [email protected] pa11y@5 pa11y-ci@2 http-server |
| 49 | + |
| 50 | +# IMPORTANT! Switching back to the root user as the last instruction. |
| 51 | +USER root |
0 commit comments