everlane/circleci

By everlane

Updated over 3 years ago

Base image for CircleCI builds

Image
1

100K+

Docker CircleCI

CircleCI has images that incorporate ruby, the version of your choice, with node and browsers to ensure asset compilation and acceptance tests work.

Currently the ruby images comes with node version that cannot be custom specified, and we are using a very specific version of node, along with a very specific version of yarn.

To avoid changing too many things as once, this image combines two circle images to get exactly the right version of ruby, with exactly the right version of node and yarn.

This is not ideal, and we would want our compilation to work with any reasonable version of yarn and node.

We should switch to a prebuilt image

Sticking with a custom build means we aren't using the latest and greatest fixes for the images. It also means we have to maintain this repo, and the related docker hub images.

Next steps should get us off these custom builds and on to prebuilt images.

A list of prebuilt images in all languages is here: images

Circle config should be changed to use image:

circleci/ruby:2.5.1-node-browsers

Combined images are on the docker hub.

Continuous Deployment

On each pull request, CircleCI builds Dockerfile and runs some basic tests within the running image. On merge to master, it will also publish the result to Docker Hub as everlane/circleci:latest.

Manual Deployment

You can also use docker to create an image locally:

docker build . -t everlane/circleci:my-tag

everlace/circleci is the user and repository on hub. The stuff after : is the tag.

To push it to docker use:

docker push everlane/circleci:ruby2.5.1-node10.6.0-browsers

Using the image on circleci

CircleCI uses .circleci/config.yml to setup the builds. Use the docker image key to set up circle with the new image:


version: 2
jobs:
  build:
    parallelism: 8

    docker:
      # image documentation @ https://circleci.com/docs/2.0/circleci-images/
       - image: everlane/circleci:ruby2.5.1-node10.6.0-browsers

# ... more docker and other setup!

Images are then available at hub

Docker Pull Command

docker pull everlane/circleci