├── 8 ├── Dockerfile └── alpine │ └── Dockerfile ├── .gitattributes ├── Dockerfile ├── LICENSE.txt ├── README.md └── alpine └── Dockerfile /.gitattributes: -------------------------------------------------------------------------------- 1 | # Automatically normalize line endings for all text-based files 2 | # http://git-scm.com/docs/gitattributes#_end_of_line_conversion 3 | * text=auto 4 | 5 | # For the following file types, normalize line endings to LF on 6 | # checkin and prevent conversion to CRLF when they are checked out 7 | # (this is required in order to prevent newline related issues like, 8 | # for example, after the build script is run) 9 | .* text eol=lf 10 | *.md text eol=lf 11 | *.sh text eol=lf 12 | *.txt text eol=lf -------------------------------------------------------------------------------- /8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.9.3 2 | 3 | ENV PYTHON_PIP_VERSION 9.0.1 4 | ENV AWS_CLI_VERSION 1.14.7 5 | ENV CLOUD_SDK_VERSION 182.0.0 6 | ENV WATCHMAN_VERSION 4.9.0 7 | ENV DOCKER_VERSION 17.09.0~ce-0~debian 8 | ENV DOCKER_COMPOSE_VERSION 1.17.0 9 | ENV PATH /google-cloud-sdk/bin:$PATH 10 | ENV GOOGLE_APPLICATION_CREDENTIALS /gcp-key.json 11 | 12 | RUN set -ex; \ 13 | apt-get update && apt-get install -y --no-install-recommends \ 14 | apt-transport-https gnupg2 software-properties-common python-dev; \ 15 | # Pip 16 | wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ 17 | python get-pip.py \ 18 | --disable-pip-version-check \ 19 | --no-cache-dir \ 20 | "pip==$PYTHON_PIP_VERSION"; \ 21 | pip --version; \ 22 | find /usr/local -depth \ 23 | \( \ 24 | \( -type d -a \( -name test -o -name tests \) \) \ 25 | -o \ 26 | \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ 27 | \) -exec rm -rf '{}' +; \ 28 | rm -f get-pip.py; \ 29 | # AWS CLI 30 | pip install awscli==${AWS_CLI_VERSION}; \ 31 | aws --version; \ 32 | # Google Cloud SDK 33 | curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 34 | tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 35 | rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 36 | ln -s /lib /lib64; \ 37 | gcloud config set core/disable_usage_reporting true; \ 38 | gcloud config set component_manager/disable_update_check true; \ 39 | gcloud components install kubectl; \ 40 | gcloud --version; \ 41 | # Docker 42 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -; \ 43 | apt-key fingerprint 0EBFCD88; \ 44 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable edge"; \ 45 | apt-get update && apt-get install -y --no-install-recommends docker-ce=$DOCKER_VERSION; \ 46 | docker --version; \ 47 | # Docker Compose 48 | curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose; \ 49 | chmod +x /usr/local/bin/docker-compose; \ 50 | docker-compose --version; \ 51 | # Watchman 52 | cd /tmp && curl -LO https://github.com/facebook/watchman/archive/v${WATCHMAN_VERSION}.tar.gz; \ 53 | tar xzf v${WATCHMAN_VERSION}.tar.gz && rm v${WATCHMAN_VERSION}.tar.gz; \ 54 | cd watchman-${WATCHMAN_VERSION}; \ 55 | ./autogen.sh; ./configure; make; make install; \ 56 | cd /tmp && rm -rf watchman-${WATCHMAN_VERSION}; \ 57 | # Chrome dependencies 58 | # https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-322838700 59 | apt-get install -y --no-install-recommends gconf-service libasound2 libatk1.0-0 libc6 \ 60 | libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 \ 61 | libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 \ 62 | libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \ 63 | libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation \ 64 | libappindicator1 libnss3 lsb-release xdg-utils; \ 65 | rm -r /var/lib/apt/lists/*; 66 | -------------------------------------------------------------------------------- /8/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.9.3-alpine 2 | 3 | ENV AWS_CLI_VERSION 1.14.7 4 | ENV CLOUD_SDK_VERSION 182.0.0 5 | ENV WATCHMAN_VERSION 4.9.0 6 | ENV DOCKER_COMPOSE_VERSION 1.17.0 7 | ENV PATH /google-cloud-sdk/bin:$PATH 8 | ENV GOOGLE_APPLICATION_CREDENTIALS /gcp-key.json 9 | 10 | RUN set -ex; \ 11 | apk add --no-cache bash git openssl-dev openssh-client ca-certificates curl g++ libc6-compat \ 12 | linux-headers make autoconf automake libtool python-dev py-crcmod py2-pip libc6-compat; \ 13 | # AWS CLI 14 | pip install awscli==${AWS_CLI_VERSION}; \ 15 | aws --version; \ 16 | # Google Cloud SDK 17 | curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 18 | tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 19 | rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 20 | ln -s /lib /lib64; \ 21 | gcloud config set core/disable_usage_reporting true; \ 22 | gcloud config set component_manager/disable_update_check true; \ 23 | gcloud components install kubectl; \ 24 | gcloud --version; \ 25 | # Docker 26 | apk add --no-cache docker; \ 27 | docker --version; \ 28 | # Docker Compose 29 | pip install docker-compose==${DOCKER_COMPOSE_VERSION}; \ 30 | docker-compose --version; \ 31 | # Watchman 32 | cd /tmp; curl -LO https://github.com/facebook/watchman/archive/v${WATCHMAN_VERSION}.tar.gz; \ 33 | tar xzf v${WATCHMAN_VERSION}.tar.gz; rm v${WATCHMAN_VERSION}.tar.gz; \ 34 | cd watchman-${WATCHMAN_VERSION}; \ 35 | ./autogen.sh; ./configure; make && make install; \ 36 | cd /tmp; rm -rf watchman-${WATCHMAN_VERSION}; \ 37 | watchman --version 38 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:9.2.1 2 | 3 | ENV PYTHON_PIP_VERSION 9.0.1 4 | ENV AWS_CLI_VERSION 1.14.7 5 | ENV CLOUD_SDK_VERSION 182.0.0 6 | ENV WATCHMAN_VERSION 4.9.0 7 | ENV DOCKER_VERSION 17.09.0~ce-0~debian 8 | ENV DOCKER_COMPOSE_VERSION 1.17.0 9 | ENV PATH /google-cloud-sdk/bin:$PATH 10 | ENV GOOGLE_APPLICATION_CREDENTIALS /gcp-key.json 11 | 12 | RUN set -ex; \ 13 | apt-get update && apt-get install -y --no-install-recommends \ 14 | apt-transport-https gnupg2 software-properties-common python-dev; \ 15 | # Pip 16 | wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; \ 17 | python get-pip.py \ 18 | --disable-pip-version-check \ 19 | --no-cache-dir \ 20 | "pip==$PYTHON_PIP_VERSION"; \ 21 | pip --version; \ 22 | find /usr/local -depth \ 23 | \( \ 24 | \( -type d -a \( -name test -o -name tests \) \) \ 25 | -o \ 26 | \( -type f -a \( -name '*.pyc' -o -name '*.pyo' \) \) \ 27 | \) -exec rm -rf '{}' +; \ 28 | rm -f get-pip.py; \ 29 | # AWS CLI 30 | pip install awscli==${AWS_CLI_VERSION}; \ 31 | aws --version; \ 32 | # Google Cloud SDK 33 | curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 34 | tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 35 | rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 36 | ln -s /lib /lib64; \ 37 | gcloud config set core/disable_usage_reporting true; \ 38 | gcloud config set component_manager/disable_update_check true; \ 39 | gcloud components install kubectl; \ 40 | gcloud --version; \ 41 | # Docker 42 | curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -; \ 43 | apt-key fingerprint 0EBFCD88; \ 44 | add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable edge"; \ 45 | apt-get update && apt-get install -y --no-install-recommends docker-ce=$DOCKER_VERSION; \ 46 | docker --version; \ 47 | # Docker Compose 48 | curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose; \ 49 | chmod +x /usr/local/bin/docker-compose; \ 50 | docker-compose --version; \ 51 | # Watchman 52 | cd /tmp && curl -LO https://github.com/facebook/watchman/archive/v${WATCHMAN_VERSION}.tar.gz; \ 53 | tar xzf v${WATCHMAN_VERSION}.tar.gz && rm v${WATCHMAN_VERSION}.tar.gz; \ 54 | cd watchman-${WATCHMAN_VERSION}; \ 55 | ./autogen.sh; ./configure; make; make install; \ 56 | cd /tmp && rm -rf watchman-${WATCHMAN_VERSION}; \ 57 | # Chrome dependencies 58 | # https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-322838700 59 | apt-get install -y --no-install-recommends gconf-service libasound2 libatk1.0-0 libc6 \ 60 | libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 \ 61 | libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 \ 62 | libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 \ 63 | libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation \ 64 | libappindicator1 libnss3 lsb-release xdg-utils; \ 65 | rm -r /var/lib/apt/lists/*; 66 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | The MIT License 3 | 4 | Copyright (c) 2017-present Kriasoft. All rights reserved. 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Node.js CI 2 | 3 | **Node.js CI** is a fork of the official [Node.js](https://hub.docker.com/_/node/) Docker image optimized for a CI environment. For more information visit [Using custom-built Docker images](https://circleci.com/docs/2.0/custom-images/) at [Circle CI](https://circleci.com/). 4 | 5 | ### Supported tags and respective `Dockerfile` links 6 | 7 | * `9.2.1`, `9.2`, `9`, `latest` *[(Dockerfile)](https://github.com/kriasoft/docker-node-ci/blob/v9.2.1/Dockerfile)* 8 | * `9.2.1-alpine`, `9.2-alpine`, `9-alpine`, `alpine` *[(Dockerfile)](https://github.com/kriasoft/docker-node-ci/blob/v9.2.1/alpine/Dockerfile)* 9 | * `8.9.3`, `8.9`, `8`, `carbon` *[(Dockerfile)](https://github.com/kriasoft/docker-node-ci/blob/v8.9.3/8/Dockerfile)* 10 | * `8.9.3-alpine`, `8.9-alpine`, `8-alpine`, `carbon-alpine` *[(Dockerfile)](https://github.com/kriasoft/docker-node-ci/blob/v8.9.3/8/alpine/Dockerfile)* 11 | 12 | ### Pre-installed packages 13 | 14 | * [Bash](https://www.gnu.org/software/bash/) 15 | * [OpenSSH Client](https://www.openssh.com/) 16 | * [Curl](https://curl.haxx.se/) 17 | * [ca-certificates](https://packages.debian.org/sid/ca-certificates) 18 | * [Git](https://git-scm.com/) 19 | * [Docker](https://www.docker.com/) 20 | * [Docker Compose](https://docs.docker.com/compose/) 21 | * [AWS CLI](https://aws.amazon.com/cli/) 22 | * [Google Cloud SDK](https://cloud.google.com/sdk/) 23 | * [Kubernetes CLI](https://kubernetes.io/docs/user-guide/kubectl-overview/) 24 | * [Watchman](https://facebook.github.io/watchman/) 25 | * [Chrome Headless dependencies](https://github.com/GoogleChrome/puppeteer/issues/290#issuecomment-322838700) 26 | 27 | ### Related projects 28 | 29 | * [React Starter Kit](https://github.com/kriasoft/react-starter-kit) 30 | * [React Static Boilerpolate](https://github.com/kriasoft/react-static-boilerplate) 31 | * [Node.js API Starter Kit](https://github.com/kriasoft/nodejs-api-starter) 32 | -------------------------------------------------------------------------------- /alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:9.2.1-alpine 2 | 3 | ENV AWS_CLI_VERSION 1.14.7 4 | ENV CLOUD_SDK_VERSION 182.0.0 5 | ENV WATCHMAN_VERSION 4.9.0 6 | ENV DOCKER_COMPOSE_VERSION 1.17.0 7 | ENV PATH /google-cloud-sdk/bin:$PATH 8 | ENV GOOGLE_APPLICATION_CREDENTIALS /gcp-key.json 9 | 10 | RUN set -ex; \ 11 | apk add --no-cache bash git openssl-dev openssh-client ca-certificates curl g++ libc6-compat \ 12 | linux-headers make autoconf automake libtool python-dev py-crcmod py2-pip libc6-compat; \ 13 | # AWS CLI 14 | pip install awscli==${AWS_CLI_VERSION}; \ 15 | aws --version; \ 16 | # Google Cloud SDK 17 | curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 18 | tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 19 | rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz; \ 20 | ln -s /lib /lib64; \ 21 | gcloud config set core/disable_usage_reporting true; \ 22 | gcloud config set component_manager/disable_update_check true; \ 23 | gcloud components install kubectl; \ 24 | gcloud --version; \ 25 | # Docker 26 | apk add --no-cache docker; \ 27 | docker --version; \ 28 | # Docker Compose 29 | pip install docker-compose==${DOCKER_COMPOSE_VERSION}; \ 30 | docker-compose --version; \ 31 | # Watchman 32 | cd /tmp; curl -LO https://github.com/facebook/watchman/archive/v${WATCHMAN_VERSION}.tar.gz; \ 33 | tar xzf v${WATCHMAN_VERSION}.tar.gz; rm v${WATCHMAN_VERSION}.tar.gz; \ 34 | cd watchman-${WATCHMAN_VERSION}; \ 35 | ./autogen.sh; ./configure; make && make install; \ 36 | cd /tmp; rm -rf watchman-${WATCHMAN_VERSION}; \ 37 | watchman --version; 38 | --------------------------------------------------------------------------------