Ubuntu 18.04 Image#
The ubuntu1804
image is a customized image based on Ubuntu 18.04 LTS that has been
optimized for CI/CD. It comes with a set of preinstalled languages, databases,
and utility tools commonly used for CI/CD workflows. The image can be paired
with any Linux machine type when defining the agent
of your pipeline or block.
The ubuntu1804
image is a virtual machine (VM) image. The user in the environment,
named semaphore
, has full sudo
access.
The image will be updated bi-weekly, on the first and third Monday of every month. Updates can be followed on the Semaphore Changelog.
The ubuntu1804
image VM uses an APT mirror that is in the same data center as
Semaphore's build cluster, which means that caching packages will have little
effect.
Using the ubuntu1804 image in your agent configuration#
To use the ubuntu1804
image, define it as the os_image
of your agent's
machine.
version: 1.0
name: Ubuntu18 Based Pipeline
agent:
machine:
type: e1-standard-2
os_image: ubuntu1804
blocks:
- name: "Unit tests"
task:
jobs:
- name: Tests
commands:
- make test
The ubuntu1804
image can be used in combination with all Linux machine
types: e1-standard-2
, e1-standard-4
, and e1-standard-8
.
Toolbox#
The ubuntu1804
image comes with two utility tools. One for managing background
services and databases, and one for managing language versions.
- sem-version: Managing language version on Linux
- sem-service: Managing databases and services on Linux
Version control#
Following version control tools are pre-installed:
- Git (2.x)
- Git LFS (Git Large File Storage)
- GitHub CLI (2.x)
- Mercurial (4.5.x)
- Svn (1.9.x)
Browsers and Headless Browser Testing#
- Firefox 78.1
- geckodriver 0.26.0
- Google Chrome 101
- ChromeDriver 101
- Xvfb (X Virtual Framebuffer)
- Phantomjs 2.1.1
Chrome and Firefox both support headless mode. You shouldn't need to do more than install and use the relevant Selenium library for your language. Refer to the documentation of associated libraries when configuring your project.
Docker#
Docker toolset is installed and following versions are available:
- Docker 20.10
- docker-compose 1.29.2
Cloud CLIs#
- aws-cli v1 (used as
aws
) - aws-cli v2 (used as
aws2
) - azure-cli
- eb-cli
- ecs-cli
- doctl
- gcloud
- kubectl
- heroku
- terraform
- helm
Network utilities#
- httpie
- curl
- rsync
Languages#
Erlang and Elixir#
Erlang versions are installed and managed via kerl. Elixir versions are installed with kiex.
- Erlang: 21.3, 22.3, 23.1, 23.2, 23.3, 24.0, 24.1, 24.2, 24.3 (default)
- Elixir: 1.8.x, 1.9.x, 1.10.x, 1.11.x, 1.12.x, 1.13.x (1.13.4 as default)
Additional libraries:
- rebar: 2.6.4
- rebar3: 3.18.0
Go#
Versions:
- 1.10.x
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
- 1.15.x
- 1.16.x
- 1.17.x
- 1.18.x (1.18.2 as default)
Java and JVM languages#
- Java: 8u312, 11.0.15, 17.0.3
- Scala: 2.12.15, 3.1.2
- Leiningen: 2.9.1 (Clojure)
- sbt
Additional build tools#
- Maven: 3.6.3
- Gradle: 7.4.2
- Bazel: 5
JavaScript via Node.js#
Node.js versions are managed by nvm.
You can install any version you need with nvm install [version]
.
Installed version:
- v16.15.0 (set as default, with alias 16.15), includes npm 8.5.5
Additional tools#
- Yarn: 1.22.19
PHP#
PHP versions are managed by phpbrew. Installed versions:
- 7.0.x
- 7.1.x
- 7.2.x
- 7.3.x
- 7.4.x
- 8.0.x
The default installed PHP version is 7.4.29
.
Additional libraries#
phpunit: 7.5.20
Python#
Python versions are installed and managed by virtualenv. Installed versions:
- 2.7
- 3.6
- 3.7
- 3.8
- 3.9
Supporting libraries:
- pypy: 7.3.9
- pypy3: 7.3.9
- pip (for Python 2.7): 20.3.4
- pip (for Python 3.6): 21.3.1
- pip (for Python 3.7 and above): 22.1
- venv: 20.14.1
Ruby#
Available versions:
- 1.8.7-p375
- 1.9.2-p330
- 1.9.3-p551
- 2.0.0-p648
- 2.1.0 to 2.1.10
- 2.2.0 to 2.2.10
- 2.3.0 to 2.3.8
- 2.4.0 to 2.4.10
- 2.5.0 to 2.5.9
- 2.6.0 to 2.6.10
- 2.7.0 to 2.7.6
- 3.0.0 to 3.0.4
- 3.1.0 to 3.1.2
- jruby-9.2.11.1
Installing dependencies with apt package manager#
The Semaphore Ubuntu:18.04 image has most of the popular programming languages, tools, and databases preinstalled.
If the dependency you need is not present on the list above, you can install it with the Ubuntu package manager or using an alternative method such as compiling it from the source, or manually downloading binaries.
To install dependecies using the package manager (apt-get) you can use the template command below and add it to your pipeline:
sudo apt-get update
sudo apt-get install -y [your-dependency]