This is a repost from our blog
We’ve switched the default OS for new Linux projects to Ubuntu 14.04 Trusty. This means that next time you add a new Linux project it will build on Trusty by default. Please note that the change applies only to new Linux projects, so the OS of your existing projects will not be changed unless you choose to do so. You can also choose to run your new projects on Ubuntu 12.04 (Precise) under the Build Environment tab on your project’s settings page.
Here are some notable differences between our Ubuntu 14.04 Trusty and our Ubuntu 12.04 Precise build images:
Different installation path for Ruby, Python, Nodejs, and PHP
On 12.04, the versions of these languages are installed under the installation path imposed by the version manager tool such as RVM and NVM. Normally, this is somewhere under
On 14.04, we pre-install versions of these languages under
/opt/circleci/<language>. Here is what the installation path for Ruby looks like:
ubuntu@box1225:~$ ls -ls /opt/circleci/ruby
4 lrwxrwxrwx 1 ubuntu ubuntu 36 Jun 28 07:35 default -> /opt/circleci/.rvm/rubies/ruby-2.2.4
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jun 28 07:29 ruby-2.1.8
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jun 28 07:30 ruby-2.1.9
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jul 18 07:38 ruby-2.2.3
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jun 28 07:32 ruby-2.2.4
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jun 28 07:33 ruby-2.2.5
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jun 28 07:34 ruby-2.3.0
0 drwxr-xr-x 1 ubuntu ubuntu 36 Jun 28 07:35 ruby-2.3.1
Version manager tools are also installed under
/opt/circleci instead of the canonical place of
For example, RVM is installed under
ubuntu@box1225:~$ ls /opt/circleci/.rvm/
archives contrib examples gemsets installed.at log patchsets rubies tmp wrappers
bin docs gem-cache help lib man README scripts user
config environments gems hooks LICENSE patches RELEASE src VERSION
There are two reasons we changed the installation path on Ubuntu 14.04 build image:
- Making directory language installation paths consistent
/home/ubuntuclean and dedicated for storing your code to be built
Fewer services are started by default
On 12.04, many services are started by default. While this is good because you don’t have to think about which services you need to start for your builds, running unnecessary services is a waste of memory in containers.
On 14.04, only popular services are started by default. To see the list of services started by default, please take a look at Ubuntu 14.04 build image doc.
How we build the image is open sourced
On 12.04, how we build the build image is not public. Therefore, there is no way for our users to know what’s installed and how the build image is created.
On 14.04, both the tools and the creation process of build images are public. Namely, there are two tools that we use to build the image:
circleci/image-builder is a collection of shell scripts that installs many tools and software in a way that works the best on CircleCI.
The shell scripts are called by a command
circleci-installin the main Dockerfile.
Whenever we make a new build image, we run a image-builder build that builds a Docker image and push to our DockerHub repository.
circleci/package-builder builds different versions of Ruby, Python, Nodejs, and PHP and creates Debian packages that are easy to install on image-builder. These packages are then pushed to our PackageCloud repository by package-builder build.
If you happen to see something unexpected in your Linux builds, please stop by our Discuss site where our engineers and expert community users help investigate the issues found on our platform.