├── .circleci └── config.yml ├── .github ├── CODEOWNERS ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── cimg-bug-report.md │ ├── cimg-feature-request.md │ └── config.yml └── pull_request_template.md ├── .gitmodules ├── 2.7 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.0 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.1 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.2 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.3 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.4 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── Dockerfile.template ├── GEN-CHECK ├── LICENSE ├── README.md ├── build-images.sh ├── img ├── circle-circleci.svg ├── circle-docker.svg └── circle-ruby.svg ├── manifest ├── push-images.sh └── rubyFeed.sh /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | cimg: circleci/cimg@0.6.4 5 | slack: circleci/slack@4.12.1 6 | 7 | parameters: 8 | cron: 9 | type: boolean 10 | default: false 11 | 12 | workflows: 13 | automated-wf: 14 | when: << pipeline.parameters.cron >> 15 | jobs: 16 | - cimg/update: 17 | update-script: rubyFeed.sh 18 | context: 19 | - slack-notification-access-token 20 | - slack-cimg-notifications 21 | - cpe-image-bot-github-creds 22 | main-wf: 23 | when: 24 | not: << pipeline.parameters.cron >> 25 | jobs: 26 | - cimg/build-and-deploy: 27 | name: "Test" 28 | resource-class: 2xlarge+ 29 | docker-namespace: ccitest 30 | docker-repository: ruby 31 | filters: 32 | branches: 33 | ignore: 34 | - main 35 | context: 36 | - slack-notification-access-token 37 | - slack-cimg-notifications 38 | - cimg-docker-image-building 39 | post-steps: 40 | - slack/notify: 41 | branch_pattern: main 42 | event: fail 43 | mentions: "@images" 44 | template: basic_fail_1 45 | - cimg/build-and-deploy: 46 | name: "Deploy" 47 | resource-class: 2xlarge+ 48 | docker-repository: ruby 49 | filters: 50 | branches: 51 | only: 52 | - main 53 | context: 54 | - slack-notification-access-token 55 | - slack-cimg-notifications 56 | - cimg-docker-image-building 57 | - cimg-docker-image-publishing 58 | post-steps: 59 | - slack/notify: 60 | branch_pattern: main 61 | event: fail 62 | mentions: "@images" 63 | template: basic_fail_1 64 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @CircleCI-Public/images 2 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # CircleCI Docker Convenience Image Contributions 2 | 3 | We welcome all contributions to our CircleCI Docker Convenience Image repositories from the community! 4 | 5 | This file outlines best practices for contributions and what you can expect from the images team at CircleCI. 6 | 7 | ## Image Support Policy 8 | 9 | For our official CircleCI Docker Convenience Image support policy, please see [CircleCI docs](https://circleci.com/docs/convenience-images-support-policy). 10 | 11 | This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images. 12 | 13 | ## Issues 14 | 15 | Please open issues for feature requests and bug reports. Depending on the type of issue, please fill out the issue template with as much information as possible. 16 | 17 | The more information you can provide about your issue, the better we can help address the issue promptly! 18 | 19 | For feature requests, in order for us to add a tool within the image, it has to be something that is maintained and useful to a majority of CircleCI users. Every tool added makes the image larger and slower for all users, so any new additions need to be carefully thought out. 20 | 21 | While we make every effort to respond to issues quickly, however please note that we do not provide an official SLA for this. 22 | 23 | ## Contributions and Pull Requests 24 | 25 | When making changes to CircleCI Docker Convenience Images, please only make these changes in the `Dockerfile.template` file in the root of the repository. 26 | 27 | Our build and releases scripts generate new Dockerfiles based on the `Dockerfile.template` file and overwrite the Dockerfiles in the version directories. Therefore, only changes made to the `Dockerfile.template` file will be valid for a pull request as changes to other files will be lost. 28 | 29 | Additionally, please do not make changes to any of the build or push bash script files as these are also automatically generated. 30 | 31 | Ensure extra layers are not added to the Dockerfile where it is not necessary. We aim to keep layer count low to ensure good caching in the CircleCI execution environment. 32 | 33 | Please fill out the pull request template when opening a new pull request. This helps us to look into new pull requests in a timely manner. 34 | 35 | While we make every effort to respond to pull requests quickly, however please note that we do not provide an official SLA for this. 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/cimg-bug-report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a bug report for this image 4 | title: 'Bug Report: ' 5 | labels: 'bug' 6 | assignees: '' 7 | 8 | --- 9 | 10 | *Note: We also welcome PRs to fix bugs! This helps us take action faster where a bug has been identified!* 11 | 12 | For our official CircleCI Docker Convenience Image support policy, please see [CircleCI docs](https://circleci.com/docs/convenience-images-support-policy). 13 | 14 | This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images. 15 | 16 | --- 17 | 18 | **Describe the bug** 19 | A clear and concise description of what the bug is. 20 | 21 | **To Reproduce** 22 | Please provide steps to reproduce the behavior, such as a sample job or config file. 23 | 24 | **Expected behavior** 25 | A clear and concise description of what you expected to happen. 26 | 27 | **Workarounds** 28 | Are there any current workarounds for this bug that can be used currently? 29 | 30 | **Screenshots and Build Links** 31 | If possible, add screenshots and links to jobs to help explain your problem. 32 | 33 | **Additional context** 34 | Add any other context about the problem here. -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/cimg-feature-request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Create a feature / enhancement request for this image 4 | title: 'Feature Request: ' 5 | labels: 'enhancement' 6 | assignees: '' 7 | 8 | --- 9 | 10 | For our official CircleCI Docker Convenience Image support policy, please see [CircleCI docs](https://circleci.com/docs/convenience-images-support-policy). 11 | 12 | This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images. 13 | 14 | --- 15 | 16 | **Describe the Feature Request** 17 | Please describe the feature request. 18 | 19 | **Is your feature request related to a particular problem?** 20 | A clear and concise description of what the problem is. 21 | 22 | **How will this feature request benefit CircleCI jobs using this image?** 23 | For example, will it help speed up jobs significantly by not having to install a commonly used package every run? 24 | 25 | In order for us to add a tool within the image, it has to be something that is maintained and useful to a majority of CircleCI users. Every tool added makes the image larger and slower for all users, so any new additions need to be carefully thought out. 26 | 27 | **Describe the solution you would like to see** 28 | A clear and concise description of what you would like to see for this feature request. For example "I like like to see xyz package installed by default in the image". 29 | 30 | **Describe alternatives you have considered** 31 | A clear and concise description of any alternative solutions you have considered, such as different packages or workarounds. 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: CircleCI Discuss Community Forum 4 | url: https://discuss.circleci.com 5 | about: Community forum for CircleCI users -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | For our official CircleCI Docker Convenience Image support policy, please see [CircleCI docs](https://circleci.com/docs/convenience-images-support-policy). 2 | 3 | This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images. 4 | 5 | --- 6 | 7 | # Description 8 | A brief description of the changes in this PR. 9 | 10 | # Reasons 11 | Please provide reasoning for these changes and how this PR achieves them. 12 | 13 | If applicable, include a link to the related GitHub issue that this PR will close. 14 | 15 | # Checklist 16 | 17 | Please check through the following before opening your PR. Thank you! 18 | 19 | - [ ] I have made changes to the `Dockerfile.template` file only 20 | - [ ] I have not made any manual changes to automatically generated files 21 | - [ ] My PR follows best practices as described in the [contributing guidelines](CONTRIBUTING) 22 | - [ ] (Optional, but recommended) My commits are [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "shared"] 2 | path = shared 3 | url = git@github.com:CircleCI-Public/cimg-shared.git 4 | -------------------------------------------------------------------------------- /2.7/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | # NOTE: Ruby under 3.1 require OpenSSL >= 1.0.1, < 3.0.0, so use Ubuntu 20.04. 10 | FROM cimg/base:2023.01-20.04 11 | 12 | LABEL maintainer="Community & Partner Engineering Team " 13 | 14 | ENV RUBY_VERSION=2.7.8 \ 15 | RUBY_MAJOR=2.7 16 | 17 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 18 | autoconf \ 19 | bison \ 20 | dpkg-dev \ 21 | # Rails dep 22 | ffmpeg \ 23 | # until the base image has it 24 | libcurl4-openssl-dev \ 25 | libffi-dev \ 26 | libgdbm6 \ 27 | libgdbm-dev \ 28 | # Rails dep 29 | libmysqlclient-dev \ 30 | libncurses5-dev \ 31 | # Rails dep 32 | libpq-dev \ 33 | libreadline6-dev \ 34 | # install libsqlite3-dev until the base image has it 35 | # Rails dep 36 | libsqlite3-dev \ 37 | libssl-dev \ 38 | # Rails dep 39 | libxml2-dev \ 40 | libyaml-dev \ 41 | # Rails dep 42 | memcached \ 43 | # Rails dep 44 | mupdf \ 45 | # Rails dep 46 | mupdf-tools \ 47 | # Rails dep 48 | imagemagick \ 49 | # Rails dep 50 | sqlite3 \ 51 | zlib1g-dev \ 52 | # YJIT dep 53 | rustc \ 54 | && \ 55 | # Skip installing gem docs 56 | echo "gem: --no-document" > ~/.gemrc && \ 57 | mkdir -p ~/ruby && \ 58 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 59 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 60 | cd ~/ruby && \ 61 | autoconf && \ 62 | ./configure --enable-yjit --enable-shared && \ 63 | make -j "$(nproc)" && \ 64 | sudo make install && \ 65 | mkdir ~/.rubygems && \ 66 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 67 | cd && \ 68 | 69 | ruby --version && \ 70 | gem --version && \ 71 | sudo gem update --system && \ 72 | gem --version && \ 73 | bundle --version && \ 74 | 75 | # Cleanup YJIT install deps 76 | sudo apt-get remove rustc libstd-rust* 77 | 78 | ENV GEM_HOME /home/circleci/.rubygems 79 | ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 80 | -------------------------------------------------------------------------------- /2.7/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:2.7.8-node 4 | 5 | LABEL maintainer="CircleCI Community & Partner Engineering Team " 6 | 7 | # Install Selenium 8 | ENV SELENIUM_VER=3.141.59 9 | RUN curl -sSL -o selenium-server-standalone-${SELENIUM_VER}.jar "https://selenium-release.storage.googleapis.com/${SELENIUM_VER%.*}/selenium-server-standalone-${SELENIUM_VER}.jar" && \ 10 | sudo cp selenium-server-standalone-${SELENIUM_VER}.jar /usr/local/bin/selenium.jar && \ 11 | rm selenium-server-standalone-${SELENIUM_VER}.jar 12 | 13 | RUN sudo apt-get update && \ 14 | sudo apt-get install --yes --no-install-recommends \ 15 | xvfb \ 16 | && \ 17 | 18 | # Install Java only if it's not already available 19 | # Java is installed for Selenium 20 | if ! command -v java > /dev/null; then \ 21 | echo "Java not found in parent image, installing..." && \ 22 | sudo apt-get install -y --no-install-recommends --no-upgrade openjdk-11-jre; \ 23 | fi && \ 24 | sudo rm -rf /var/lib/apt/lists/* 25 | 26 | # Below is setup to allow xvfb to start when the container starts up. 27 | # The label in particular allows this image to override what CircleCI does 28 | # when booting the image. 29 | LABEL com.circleci.preserve-entrypoint=true 30 | ENV DISPLAY=":99" 31 | #RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint && \ 32 | # chmod +x /tmp/entrypoint && \ 33 | # sudo mv /tmp/entrypoint /docker-entrypoint.sh 34 | RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' | sudo tee /docker-entrypoint.sh && \ 35 | sudo chmod +x /docker-entrypoint.sh 36 | 37 | # Install a single version of Firefox. This isn't intended to be a regularly 38 | # updated thing. Instead, if this version of Firefox isn't what the end user 39 | # wants they should install a different version via the Browser Tools Orb. 40 | # 41 | # Canonical made a major technology change in how Firefox is installed from 42 | # Ubuntu 21.10 and up. The general CI space doesn't seem to be ready for a snap 43 | # based Firefox right now so we are installing it from the Mozilla PPA. 44 | RUN echo 'Package: *' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 45 | echo 'Pin: release o=LP-PPA-mozillateam' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 46 | echo 'Pin-Priority: 1001' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 47 | sudo add-apt-repository --yes ppa:mozillateam/ppa && \ 48 | sudo apt-get install --no-install-recommends --yes firefox && \ 49 | sudo rm -rf /var/lib/apt/lists/* && \ 50 | firefox --version 51 | 52 | # Install a single version of Google Chrome Stable. This isn't intended to be a 53 | # regularly updated thing. Instead, if this version of Chrome isn't what the 54 | # end user wants they should install a different version via the Browser Tools 55 | # Orb. 56 | RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && \ 57 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && \ 58 | sudo apt-get update && \ 59 | sudo apt-get install google-chrome-stable && \ 60 | sudo rm -rf /var/lib/apt/lists/* 61 | 62 | ENTRYPOINT ["/docker-entrypoint.sh"] 63 | CMD ["/bin/sh"] 64 | -------------------------------------------------------------------------------- /2.7/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:2.7.8 4 | 5 | LABEL maintainer="Community & Partner Engineering Team " 6 | 7 | # Dockerfile will pull the latest LTS release from cimg-node. 8 | RUN curl -sSL "https://raw.githubusercontent.com/CircleCI-Public/cimg-node/main/ALIASES" -o nodeAliases.txt && \ 9 | NODE_VERSION=$(grep "lts" ./nodeAliases.txt | cut -d "=" -f 2-) && \ 10 | curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz" && \ 11 | sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ 12 | rm node.tar.xz nodeAliases.txt && \ 13 | sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs 14 | 15 | ENV YARN_VERSION 1.22.18 16 | RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ 17 | sudo tar -xzf yarn.tar.gz -C /opt/ && \ 18 | rm yarn.tar.gz && \ 19 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ 20 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg 21 | -------------------------------------------------------------------------------- /3.0/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | FROM cimg/base:2024.02 10 | 11 | LABEL maintainer="CircleCI Execution Team " 12 | 13 | ENV RUBY_VERSION=3.0.7 \ 14 | RUBY_MAJOR=3.0 15 | 16 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 17 | autoconf \ 18 | bison \ 19 | dpkg-dev \ 20 | # Rails dep 21 | ffmpeg \ 22 | # until the base image has it 23 | libcurl4-openssl-dev \ 24 | libffi-dev \ 25 | libgdbm6 \ 26 | libgdbm-dev \ 27 | # Rails dep 28 | libmysqlclient-dev \ 29 | libncurses5-dev \ 30 | # Rails dep 31 | libpq-dev \ 32 | libreadline6-dev \ 33 | # install libsqlite3-dev until the base image has it 34 | # Rails dep 35 | libsqlite3-dev \ 36 | libssl-dev \ 37 | # Rails dep 38 | libxml2-dev \ 39 | libyaml-dev \ 40 | # Rails dep 41 | memcached \ 42 | # Rails dep 43 | mupdf \ 44 | # Rails dep 45 | mupdf-tools \ 46 | # Rails dep 47 | imagemagick \ 48 | # Rails dep 49 | sqlite3 \ 50 | zlib1g-dev \ 51 | # YJIT dep 52 | rustc \ 53 | # Jemalloc 54 | libjemalloc-dev \ 55 | # Build gems with Rust extensions dep 56 | clang-14 && \ 57 | # For Ruby 3.0 install OpenSSL 1.1.1 to make it work on Ubuntu 20.04 58 | if [ "${RUBY_MAJOR}" == "3.0" ]; then \ 59 | if [[ $(uname -m) == "x86_64" ]]; then \ 60 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb; \ 61 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb; \ 62 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; \ 63 | else \ 64 | wget http://ports.ubuntu.com/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_arm64.deb; \ 65 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_arm64.deb; \ 66 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ 67 | fi && \ 68 | sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2*.deb; \ 69 | sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2*.deb; \ 70 | sudo dpkg -i openssl_1.1.1f-1ubuntu2*.deb; \ 71 | rm -f *.deb; \ 72 | fi && \ 73 | # Skip installing gem docs 74 | echo "gem: --no-document" > ~/.gemrc && \ 75 | mkdir -p ~/ruby && \ 76 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 77 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 78 | cd ~/ruby && \ 79 | autoconf && \ 80 | ./configure --enable-yjit --enable-shared --disable-install-doc && \ 81 | make -j "$(nproc)" && \ 82 | sudo make install && \ 83 | mkdir ~/.rubygems && \ 84 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 85 | cd && \ 86 | 87 | ruby --version && \ 88 | gem --version && \ 89 | MAKEFLAGS=-j"$(nproc)" sudo gem update --system && \ 90 | gem --version && \ 91 | bundle --version && \ 92 | 93 | # Cleanup YJIT install deps 94 | sudo apt-get remove rustc libstd-rust* 95 | 96 | ENV GEM_HOME /home/circleci/.rubygems 97 | ENV PATH $GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 98 | -------------------------------------------------------------------------------- /3.0/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.0.7-node 4 | 5 | LABEL maintainer="CircleCI Community & Partner Engineering Team " 6 | 7 | # Install Selenium 8 | ENV SELENIUM_VER=3.141.59 9 | RUN curl -sSL -o selenium-server-standalone-${SELENIUM_VER}.jar "https://selenium-release.storage.googleapis.com/${SELENIUM_VER%.*}/selenium-server-standalone-${SELENIUM_VER}.jar" && \ 10 | sudo cp selenium-server-standalone-${SELENIUM_VER}.jar /usr/local/bin/selenium.jar && \ 11 | rm selenium-server-standalone-${SELENIUM_VER}.jar 12 | 13 | RUN sudo apt-get update && \ 14 | sudo apt-get install --yes --no-install-recommends \ 15 | xvfb \ 16 | && \ 17 | 18 | # Install Java only if it's not already available 19 | # Java is installed for Selenium 20 | if ! command -v java > /dev/null; then \ 21 | echo "Java not found in parent image, installing..." && \ 22 | sudo apt-get install -y --no-install-recommends --no-upgrade openjdk-11-jre; \ 23 | fi && \ 24 | sudo rm -rf /var/lib/apt/lists/* 25 | 26 | # Below is setup to allow xvfb to start when the container starts up. 27 | # The label in particular allows this image to override what CircleCI does 28 | # when booting the image. 29 | LABEL com.circleci.preserve-entrypoint=true 30 | ENV DISPLAY=":99" 31 | #RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint && \ 32 | # chmod +x /tmp/entrypoint && \ 33 | # sudo mv /tmp/entrypoint /docker-entrypoint.sh 34 | RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' | sudo tee /docker-entrypoint.sh && \ 35 | sudo chmod +x /docker-entrypoint.sh 36 | 37 | # Install a single version of Firefox. This isn't intended to be a regularly 38 | # updated thing. Instead, if this version of Firefox isn't what the end user 39 | # wants they should install a different version via the Browser Tools Orb. 40 | # 41 | # Canonical made a major technology change in how Firefox is installed from 42 | # Ubuntu 21.10 and up. The general CI space doesn't seem to be ready for a snap 43 | # based Firefox right now so we are installing it from the Mozilla PPA. 44 | RUN echo 'Package: *' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 45 | echo 'Pin: release o=LP-PPA-mozillateam' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 46 | echo 'Pin-Priority: 1001' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 47 | sudo add-apt-repository --yes ppa:mozillateam/ppa && \ 48 | sudo apt-get install --no-install-recommends --yes firefox && \ 49 | sudo rm -rf /var/lib/apt/lists/* && \ 50 | firefox --version 51 | 52 | # Install a single version of Google Chrome Stable. This isn't intended to be a 53 | # regularly updated thing. Instead, if this version of Chrome isn't what the 54 | # end user wants they should install a different version via the Browser Tools 55 | # Orb. 56 | RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && \ 57 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && \ 58 | sudo apt-get update && \ 59 | sudo apt-get install google-chrome-stable && \ 60 | sudo rm -rf /var/lib/apt/lists/* 61 | 62 | ENTRYPOINT ["/docker-entrypoint.sh"] 63 | CMD ["/bin/sh"] 64 | -------------------------------------------------------------------------------- /3.0/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.0.7 4 | 5 | LABEL maintainer="Community & Partner Engineering Team " 6 | 7 | # Dockerfile will pull the latest LTS release from cimg-node. 8 | RUN curl -sSL "https://raw.githubusercontent.com/CircleCI-Public/cimg-node/main/ALIASES" -o nodeAliases.txt && \ 9 | NODE_VERSION=$(grep "lts" ./nodeAliases.txt | cut -d "=" -f 2-) && \ 10 | [[ $(uname -m) == "x86_64" ]] && ARCH="x64" || ARCH="arm64" && \ 11 | curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" && \ 12 | sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ 13 | rm node.tar.xz nodeAliases.txt && \ 14 | sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs 15 | 16 | ENV YARN_VERSION 1.22.19 17 | RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ 18 | sudo tar -xzf yarn.tar.gz -C /opt/ && \ 19 | rm yarn.tar.gz && \ 20 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ 21 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg 22 | -------------------------------------------------------------------------------- /3.1/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | FROM cimg/base:2024.02 10 | 11 | LABEL maintainer="CircleCI Execution Team " 12 | 13 | ENV RUBY_VERSION=3.1.7 \ 14 | RUBY_MAJOR=3.1 15 | 16 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 17 | autoconf \ 18 | bison \ 19 | dpkg-dev \ 20 | # Rails dep 21 | ffmpeg \ 22 | # until the base image has it 23 | libcurl4-openssl-dev \ 24 | libffi-dev \ 25 | libgdbm6 \ 26 | libgdbm-dev \ 27 | # Rails dep 28 | libmysqlclient-dev \ 29 | libncurses5-dev \ 30 | # Rails dep 31 | libpq-dev \ 32 | libreadline6-dev \ 33 | # install libsqlite3-dev until the base image has it 34 | # Rails dep 35 | libsqlite3-dev \ 36 | libssl-dev \ 37 | # Rails dep 38 | libxml2-dev \ 39 | libyaml-dev \ 40 | # Rails dep 41 | memcached \ 42 | # Rails dep 43 | mupdf \ 44 | # Rails dep 45 | mupdf-tools \ 46 | # Rails dep 47 | imagemagick \ 48 | # Rails dep 49 | sqlite3 \ 50 | zlib1g-dev \ 51 | # YJIT dep 52 | rustc \ 53 | # Jemalloc 54 | libjemalloc-dev \ 55 | # Build gems with Rust extensions dep 56 | clang-14 && \ 57 | # For Ruby 3.0 install OpenSSL 1.1.1 to make it work on Ubuntu 20.04 58 | if [ "${RUBY_MAJOR}" == "3.0" ]; then \ 59 | if [[ $(uname -m) == "x86_64" ]]; then \ 60 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb; \ 61 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb; \ 62 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; \ 63 | else \ 64 | wget http://ports.ubuntu.com/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_arm64.deb; \ 65 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_arm64.deb; \ 66 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ 67 | fi && \ 68 | sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2*.deb; \ 69 | sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2*.deb; \ 70 | sudo dpkg -i openssl_1.1.1f-1ubuntu2*.deb; \ 71 | rm -f *.deb; \ 72 | fi && \ 73 | # Skip installing gem docs 74 | echo "gem: --no-document" > ~/.gemrc && \ 75 | mkdir -p ~/ruby && \ 76 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 77 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 78 | cd ~/ruby && \ 79 | autoconf && \ 80 | ./configure --enable-yjit --enable-shared --disable-install-doc && \ 81 | make -j "$(nproc)" && \ 82 | sudo make install && \ 83 | mkdir ~/.rubygems && \ 84 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 85 | cd && \ 86 | # Check that installs succeeded 87 | ruby --version && \ 88 | gem --version && \ 89 | MAKEFLAGS=-j"$(nproc)" sudo gem update --system && \ 90 | gem --version && \ 91 | bundle --version && \ 92 | # Cleanup YJIT install deps 93 | sudo apt-get remove rustc libstd-rust* 94 | 95 | ENV GEM_HOME=/home/circleci/.rubygems 96 | ENV PATH=$GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 97 | -------------------------------------------------------------------------------- /3.1/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.1.7-node 4 | 5 | LABEL maintainer="CircleCI Community & Partner Engineering Team " 6 | 7 | # Install Selenium 8 | ENV SELENIUM_VER=3.141.59 9 | RUN curl -sSL -o selenium-server-standalone-${SELENIUM_VER}.jar "https://selenium-release.storage.googleapis.com/${SELENIUM_VER%.*}/selenium-server-standalone-${SELENIUM_VER}.jar" && \ 10 | sudo cp selenium-server-standalone-${SELENIUM_VER}.jar /usr/local/bin/selenium.jar && \ 11 | rm selenium-server-standalone-${SELENIUM_VER}.jar 12 | 13 | RUN sudo apt-get update && \ 14 | sudo apt-get install --yes --no-install-recommends \ 15 | xvfb \ 16 | && \ 17 | 18 | # Install Java only if it's not already available 19 | # Java is installed for Selenium 20 | if ! command -v java > /dev/null; then \ 21 | echo "Java not found in parent image, installing..." && \ 22 | sudo apt-get install -y --no-install-recommends --no-upgrade openjdk-11-jre; \ 23 | fi && \ 24 | sudo rm -rf /var/lib/apt/lists/* 25 | 26 | # Below is setup to allow xvfb to start when the container starts up. 27 | # The label in particular allows this image to override what CircleCI does 28 | # when booting the image. 29 | LABEL com.circleci.preserve-entrypoint=true 30 | ENV DISPLAY=":99" 31 | #RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint && \ 32 | # chmod +x /tmp/entrypoint && \ 33 | # sudo mv /tmp/entrypoint /docker-entrypoint.sh 34 | RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' | sudo tee /docker-entrypoint.sh && \ 35 | sudo chmod +x /docker-entrypoint.sh 36 | 37 | # Install a single version of Firefox. This isn't intended to be a regularly 38 | # updated thing. Instead, if this version of Firefox isn't what the end user 39 | # wants they should install a different version via the Browser Tools Orb. 40 | # 41 | # Canonical made a major technology change in how Firefox is installed from 42 | # Ubuntu 21.10 and up. The general CI space doesn't seem to be ready for a snap 43 | # based Firefox right now so we are installing it from the Mozilla PPA. 44 | RUN echo 'Package: *' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 45 | echo 'Pin: release o=LP-PPA-mozillateam' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 46 | echo 'Pin-Priority: 1001' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 47 | sudo add-apt-repository --yes ppa:mozillateam/ppa && \ 48 | sudo apt-get install --no-install-recommends --yes firefox && \ 49 | sudo rm -rf /var/lib/apt/lists/* && \ 50 | firefox --version 51 | 52 | # Install a single version of Google Chrome Stable. This isn't intended to be a 53 | # regularly updated thing. Instead, if this version of Chrome isn't what the 54 | # end user wants they should install a different version via the Browser Tools 55 | # Orb. 56 | RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && \ 57 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && \ 58 | sudo apt-get update && \ 59 | sudo apt-get install google-chrome-stable && \ 60 | sudo rm -rf /var/lib/apt/lists/* 61 | 62 | ENTRYPOINT ["/docker-entrypoint.sh"] 63 | CMD ["/bin/sh"] 64 | -------------------------------------------------------------------------------- /3.1/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.1.7 4 | 5 | LABEL maintainer="Community & Partner Engineering Team " 6 | 7 | # Dockerfile will pull the latest LTS release from cimg-node. 8 | RUN curl -sSL "https://raw.githubusercontent.com/CircleCI-Public/cimg-node/main/ALIASES" -o nodeAliases.txt && \ 9 | NODE_VERSION=$(grep "lts" ./nodeAliases.txt | cut -d "=" -f 2-) && \ 10 | [[ $(uname -m) == "x86_64" ]] && ARCH="x64" || ARCH="arm64" && \ 11 | curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" && \ 12 | sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ 13 | rm node.tar.xz nodeAliases.txt && \ 14 | sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs 15 | 16 | ENV YARN_VERSION 1.22.19 17 | RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ 18 | sudo tar -xzf yarn.tar.gz -C /opt/ && \ 19 | rm yarn.tar.gz && \ 20 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ 21 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg 22 | -------------------------------------------------------------------------------- /3.2/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | FROM cimg/base:2024.02 10 | 11 | LABEL maintainer="CircleCI Execution Team " 12 | 13 | ENV RUBY_VERSION=3.2.8 \ 14 | RUBY_MAJOR=3.2 15 | 16 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 17 | autoconf \ 18 | bison \ 19 | dpkg-dev \ 20 | # Rails dep 21 | ffmpeg \ 22 | # until the base image has it 23 | libcurl4-openssl-dev \ 24 | libffi-dev \ 25 | libgdbm6 \ 26 | libgdbm-dev \ 27 | # Rails dep 28 | libmysqlclient-dev \ 29 | libncurses5-dev \ 30 | # Rails dep 31 | libpq-dev \ 32 | libreadline6-dev \ 33 | # install libsqlite3-dev until the base image has it 34 | # Rails dep 35 | libsqlite3-dev \ 36 | libssl-dev \ 37 | # Rails dep 38 | libxml2-dev \ 39 | libyaml-dev \ 40 | # Rails dep 41 | memcached \ 42 | # Rails dep 43 | mupdf \ 44 | # Rails dep 45 | mupdf-tools \ 46 | # Rails dep 47 | imagemagick \ 48 | # Rails dep 49 | sqlite3 \ 50 | zlib1g-dev \ 51 | # YJIT dep 52 | rustc \ 53 | # Jemalloc 54 | libjemalloc-dev \ 55 | # Build gems with Rust extensions dep 56 | clang-14 && \ 57 | # For Ruby 3.0 install OpenSSL 1.1.1 to make it work on Ubuntu 20.04 58 | if [ "${RUBY_MAJOR}" == "3.0" ]; then \ 59 | if [[ $(uname -m) == "x86_64" ]]; then \ 60 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb; \ 61 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb; \ 62 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; \ 63 | else \ 64 | wget http://ports.ubuntu.com/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_arm64.deb; \ 65 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_arm64.deb; \ 66 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ 67 | fi && \ 68 | sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2*.deb; \ 69 | sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2*.deb; \ 70 | sudo dpkg -i openssl_1.1.1f-1ubuntu2*.deb; \ 71 | rm -f *.deb; \ 72 | fi && \ 73 | # Skip installing gem docs 74 | echo "gem: --no-document" > ~/.gemrc && \ 75 | mkdir -p ~/ruby && \ 76 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 77 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 78 | cd ~/ruby && \ 79 | autoconf && \ 80 | ./configure --enable-yjit --enable-shared --disable-install-doc && \ 81 | make -j "$(nproc)" && \ 82 | sudo make install && \ 83 | mkdir ~/.rubygems && \ 84 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 85 | cd && \ 86 | # Check that installs succeeded 87 | ruby --version && \ 88 | gem --version && \ 89 | MAKEFLAGS=-j"$(nproc)" sudo gem update --system && \ 90 | gem --version && \ 91 | bundle --version && \ 92 | # Cleanup YJIT install deps 93 | sudo apt-get remove rustc libstd-rust* 94 | 95 | ENV GEM_HOME=/home/circleci/.rubygems 96 | ENV PATH=$GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 97 | -------------------------------------------------------------------------------- /3.2/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.2.8-node 4 | 5 | LABEL maintainer="CircleCI Community & Partner Engineering Team " 6 | 7 | # Install Selenium 8 | ENV SELENIUM_VER=3.141.59 9 | RUN curl -sSL -o selenium-server-standalone-${SELENIUM_VER}.jar "https://selenium-release.storage.googleapis.com/${SELENIUM_VER%.*}/selenium-server-standalone-${SELENIUM_VER}.jar" && \ 10 | sudo cp selenium-server-standalone-${SELENIUM_VER}.jar /usr/local/bin/selenium.jar && \ 11 | rm selenium-server-standalone-${SELENIUM_VER}.jar 12 | 13 | RUN sudo apt-get update && \ 14 | sudo apt-get install --yes --no-install-recommends \ 15 | xvfb \ 16 | && \ 17 | 18 | # Install Java only if it's not already available 19 | # Java is installed for Selenium 20 | if ! command -v java > /dev/null; then \ 21 | echo "Java not found in parent image, installing..." && \ 22 | sudo apt-get install -y --no-install-recommends --no-upgrade openjdk-11-jre; \ 23 | fi && \ 24 | sudo rm -rf /var/lib/apt/lists/* 25 | 26 | # Below is setup to allow xvfb to start when the container starts up. 27 | # The label in particular allows this image to override what CircleCI does 28 | # when booting the image. 29 | LABEL com.circleci.preserve-entrypoint=true 30 | ENV DISPLAY=":99" 31 | #RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint && \ 32 | # chmod +x /tmp/entrypoint && \ 33 | # sudo mv /tmp/entrypoint /docker-entrypoint.sh 34 | RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' | sudo tee /docker-entrypoint.sh && \ 35 | sudo chmod +x /docker-entrypoint.sh 36 | 37 | # Install a single version of Firefox. This isn't intended to be a regularly 38 | # updated thing. Instead, if this version of Firefox isn't what the end user 39 | # wants they should install a different version via the Browser Tools Orb. 40 | # 41 | # Canonical made a major technology change in how Firefox is installed from 42 | # Ubuntu 21.10 and up. The general CI space doesn't seem to be ready for a snap 43 | # based Firefox right now so we are installing it from the Mozilla PPA. 44 | RUN echo 'Package: *' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 45 | echo 'Pin: release o=LP-PPA-mozillateam' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 46 | echo 'Pin-Priority: 1001' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 47 | sudo add-apt-repository --yes ppa:mozillateam/ppa && \ 48 | sudo apt-get install --no-install-recommends --yes firefox && \ 49 | sudo rm -rf /var/lib/apt/lists/* && \ 50 | firefox --version 51 | 52 | # Install a single version of Google Chrome Stable. This isn't intended to be a 53 | # regularly updated thing. Instead, if this version of Chrome isn't what the 54 | # end user wants they should install a different version via the Browser Tools 55 | # Orb. 56 | RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && \ 57 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && \ 58 | sudo apt-get update && \ 59 | sudo apt-get install google-chrome-stable && \ 60 | sudo rm -rf /var/lib/apt/lists/* 61 | 62 | ENTRYPOINT ["/docker-entrypoint.sh"] 63 | CMD ["/bin/sh"] 64 | -------------------------------------------------------------------------------- /3.2/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.2.8 4 | 5 | LABEL maintainer="Community & Partner Engineering Team " 6 | 7 | # Dockerfile will pull the latest LTS release from cimg-node. 8 | RUN curl -sSL "https://raw.githubusercontent.com/CircleCI-Public/cimg-node/main/ALIASES" -o nodeAliases.txt && \ 9 | NODE_VERSION=$(grep "lts" ./nodeAliases.txt | cut -d "=" -f 2-) && \ 10 | [[ $(uname -m) == "x86_64" ]] && ARCH="x64" || ARCH="arm64" && \ 11 | curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" && \ 12 | sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ 13 | rm node.tar.xz nodeAliases.txt && \ 14 | sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs 15 | 16 | ENV YARN_VERSION 1.22.19 17 | RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ 18 | sudo tar -xzf yarn.tar.gz -C /opt/ && \ 19 | rm yarn.tar.gz && \ 20 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ 21 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg 22 | -------------------------------------------------------------------------------- /3.3/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | FROM cimg/base:2024.02 10 | 11 | LABEL maintainer="CircleCI Execution Team " 12 | 13 | ENV RUBY_VERSION=3.3.8 \ 14 | RUBY_MAJOR=3.3 15 | 16 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 17 | autoconf \ 18 | bison \ 19 | dpkg-dev \ 20 | # Rails dep 21 | ffmpeg \ 22 | # until the base image has it 23 | libcurl4-openssl-dev \ 24 | libffi-dev \ 25 | libgdbm6 \ 26 | libgdbm-dev \ 27 | # Rails dep 28 | libmysqlclient-dev \ 29 | libncurses5-dev \ 30 | # Rails dep 31 | libpq-dev \ 32 | libreadline6-dev \ 33 | # install libsqlite3-dev until the base image has it 34 | # Rails dep 35 | libsqlite3-dev \ 36 | libssl-dev \ 37 | # Rails dep 38 | libxml2-dev \ 39 | libyaml-dev \ 40 | # Rails dep 41 | memcached \ 42 | # Rails dep 43 | mupdf \ 44 | # Rails dep 45 | mupdf-tools \ 46 | # Rails dep 47 | imagemagick \ 48 | # Rails dep 49 | sqlite3 \ 50 | zlib1g-dev \ 51 | # YJIT dep 52 | rustc \ 53 | # Jemalloc 54 | libjemalloc-dev \ 55 | # Build gems with Rust extensions dep 56 | clang-14 && \ 57 | # For Ruby 3.0 install OpenSSL 1.1.1 to make it work on Ubuntu 20.04 58 | if [ "${RUBY_MAJOR}" == "3.0" ]; then \ 59 | if [[ $(uname -m) == "x86_64" ]]; then \ 60 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb; \ 61 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb; \ 62 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; \ 63 | else \ 64 | wget http://ports.ubuntu.com/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_arm64.deb; \ 65 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_arm64.deb; \ 66 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ 67 | fi && \ 68 | sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2*.deb; \ 69 | sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2*.deb; \ 70 | sudo dpkg -i openssl_1.1.1f-1ubuntu2*.deb; \ 71 | rm -f *.deb; \ 72 | fi && \ 73 | # Skip installing gem docs 74 | echo "gem: --no-document" > ~/.gemrc && \ 75 | mkdir -p ~/ruby && \ 76 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 77 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 78 | cd ~/ruby && \ 79 | autoconf && \ 80 | ./configure --enable-yjit --enable-shared --disable-install-doc && \ 81 | make -j "$(nproc)" && \ 82 | sudo make install && \ 83 | mkdir ~/.rubygems && \ 84 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 85 | cd && \ 86 | # Check that installs succeeded 87 | ruby --version && \ 88 | gem --version && \ 89 | MAKEFLAGS=-j"$(nproc)" sudo gem update --system && \ 90 | gem --version && \ 91 | bundle --version && \ 92 | # Cleanup YJIT install deps 93 | sudo apt-get remove rustc libstd-rust* 94 | 95 | ENV GEM_HOME=/home/circleci/.rubygems 96 | ENV PATH=$GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 97 | -------------------------------------------------------------------------------- /3.3/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.3.8-node 4 | 5 | LABEL maintainer="CircleCI Community & Partner Engineering Team " 6 | 7 | # Install Selenium 8 | ENV SELENIUM_VER=3.141.59 9 | RUN curl -sSL -o selenium-server-standalone-${SELENIUM_VER}.jar "https://selenium-release.storage.googleapis.com/${SELENIUM_VER%.*}/selenium-server-standalone-${SELENIUM_VER}.jar" && \ 10 | sudo cp selenium-server-standalone-${SELENIUM_VER}.jar /usr/local/bin/selenium.jar && \ 11 | rm selenium-server-standalone-${SELENIUM_VER}.jar 12 | 13 | RUN sudo apt-get update && \ 14 | sudo apt-get install --yes --no-install-recommends \ 15 | xvfb \ 16 | && \ 17 | 18 | # Install Java only if it's not already available 19 | # Java is installed for Selenium 20 | if ! command -v java > /dev/null; then \ 21 | echo "Java not found in parent image, installing..." && \ 22 | sudo apt-get install -y --no-install-recommends --no-upgrade openjdk-11-jre; \ 23 | fi && \ 24 | sudo rm -rf /var/lib/apt/lists/* 25 | 26 | # Below is setup to allow xvfb to start when the container starts up. 27 | # The label in particular allows this image to override what CircleCI does 28 | # when booting the image. 29 | LABEL com.circleci.preserve-entrypoint=true 30 | ENV DISPLAY=":99" 31 | #RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint && \ 32 | # chmod +x /tmp/entrypoint && \ 33 | # sudo mv /tmp/entrypoint /docker-entrypoint.sh 34 | RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' | sudo tee /docker-entrypoint.sh && \ 35 | sudo chmod +x /docker-entrypoint.sh 36 | 37 | # Install a single version of Firefox. This isn't intended to be a regularly 38 | # updated thing. Instead, if this version of Firefox isn't what the end user 39 | # wants they should install a different version via the Browser Tools Orb. 40 | # 41 | # Canonical made a major technology change in how Firefox is installed from 42 | # Ubuntu 21.10 and up. The general CI space doesn't seem to be ready for a snap 43 | # based Firefox right now so we are installing it from the Mozilla PPA. 44 | RUN echo 'Package: *' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 45 | echo 'Pin: release o=LP-PPA-mozillateam' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 46 | echo 'Pin-Priority: 1001' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 47 | sudo add-apt-repository --yes ppa:mozillateam/ppa && \ 48 | sudo apt-get install --no-install-recommends --yes firefox && \ 49 | sudo rm -rf /var/lib/apt/lists/* && \ 50 | firefox --version 51 | 52 | # Install a single version of Google Chrome Stable. This isn't intended to be a 53 | # regularly updated thing. Instead, if this version of Chrome isn't what the 54 | # end user wants they should install a different version via the Browser Tools 55 | # Orb. 56 | RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && \ 57 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && \ 58 | sudo apt-get update && \ 59 | sudo apt-get install google-chrome-stable && \ 60 | sudo rm -rf /var/lib/apt/lists/* 61 | 62 | ENTRYPOINT ["/docker-entrypoint.sh"] 63 | CMD ["/bin/sh"] 64 | -------------------------------------------------------------------------------- /3.3/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.3.8 4 | 5 | LABEL maintainer="Community & Partner Engineering Team " 6 | 7 | # Dockerfile will pull the latest LTS release from cimg-node. 8 | RUN curl -sSL "https://raw.githubusercontent.com/CircleCI-Public/cimg-node/main/ALIASES" -o nodeAliases.txt && \ 9 | NODE_VERSION=$(grep "lts" ./nodeAliases.txt | cut -d "=" -f 2-) && \ 10 | [[ $(uname -m) == "x86_64" ]] && ARCH="x64" || ARCH="arm64" && \ 11 | curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" && \ 12 | sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ 13 | rm node.tar.xz nodeAliases.txt && \ 14 | sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs 15 | 16 | ENV YARN_VERSION 1.22.19 17 | RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ 18 | sudo tar -xzf yarn.tar.gz -C /opt/ && \ 19 | rm yarn.tar.gz && \ 20 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ 21 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg 22 | -------------------------------------------------------------------------------- /3.4/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | FROM cimg/base:2024.02 10 | 11 | LABEL maintainer="CircleCI Execution Team " 12 | 13 | ENV RUBY_VERSION=3.4.4 \ 14 | RUBY_MAJOR=3.4 15 | 16 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 17 | autoconf \ 18 | bison \ 19 | dpkg-dev \ 20 | # Rails dep 21 | ffmpeg \ 22 | # until the base image has it 23 | libcurl4-openssl-dev \ 24 | libffi-dev \ 25 | libgdbm6 \ 26 | libgdbm-dev \ 27 | # Rails dep 28 | libmysqlclient-dev \ 29 | libncurses5-dev \ 30 | # Rails dep 31 | libpq-dev \ 32 | libreadline6-dev \ 33 | # install libsqlite3-dev until the base image has it 34 | # Rails dep 35 | libsqlite3-dev \ 36 | libssl-dev \ 37 | # Rails dep 38 | libxml2-dev \ 39 | libyaml-dev \ 40 | # Rails dep 41 | memcached \ 42 | # Rails dep 43 | mupdf \ 44 | # Rails dep 45 | mupdf-tools \ 46 | # Rails dep 47 | imagemagick \ 48 | # Rails dep 49 | sqlite3 \ 50 | zlib1g-dev \ 51 | # YJIT dep 52 | rustc \ 53 | # Jemalloc 54 | libjemalloc-dev \ 55 | # Build gems with Rust extensions dep 56 | clang-14 && \ 57 | # For Ruby 3.0 install OpenSSL 1.1.1 to make it work on Ubuntu 20.04 58 | if [ "${RUBY_MAJOR}" == "3.0" ]; then \ 59 | if [[ $(uname -m) == "x86_64" ]]; then \ 60 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb; \ 61 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb; \ 62 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; \ 63 | else \ 64 | wget http://ports.ubuntu.com/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_arm64.deb; \ 65 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_arm64.deb; \ 66 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ 67 | fi && \ 68 | sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2*.deb; \ 69 | sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2*.deb; \ 70 | sudo dpkg -i openssl_1.1.1f-1ubuntu2*.deb; \ 71 | rm -f *.deb; \ 72 | fi && \ 73 | # Skip installing gem docs 74 | echo "gem: --no-document" > ~/.gemrc && \ 75 | mkdir -p ~/ruby && \ 76 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 77 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 78 | cd ~/ruby && \ 79 | autoconf && \ 80 | ./configure --enable-yjit --enable-shared --disable-install-doc && \ 81 | make -j "$(nproc)" && \ 82 | sudo make install && \ 83 | mkdir ~/.rubygems && \ 84 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 85 | cd && \ 86 | # Check that installs succeeded 87 | ruby --version && \ 88 | gem --version && \ 89 | MAKEFLAGS=-j"$(nproc)" sudo gem update --system && \ 90 | gem --version && \ 91 | bundle --version && \ 92 | # Cleanup YJIT install deps 93 | sudo apt-get remove rustc libstd-rust* 94 | 95 | ENV GEM_HOME=/home/circleci/.rubygems 96 | ENV PATH=$GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 97 | -------------------------------------------------------------------------------- /3.4/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.4.4-node 4 | 5 | LABEL maintainer="CircleCI Community & Partner Engineering Team " 6 | 7 | # Install Selenium 8 | ENV SELENIUM_VER=3.141.59 9 | RUN curl -sSL -o selenium-server-standalone-${SELENIUM_VER}.jar "https://selenium-release.storage.googleapis.com/${SELENIUM_VER%.*}/selenium-server-standalone-${SELENIUM_VER}.jar" && \ 10 | sudo cp selenium-server-standalone-${SELENIUM_VER}.jar /usr/local/bin/selenium.jar && \ 11 | rm selenium-server-standalone-${SELENIUM_VER}.jar 12 | 13 | RUN sudo apt-get update && \ 14 | sudo apt-get install --yes --no-install-recommends \ 15 | xvfb \ 16 | && \ 17 | 18 | # Install Java only if it's not already available 19 | # Java is installed for Selenium 20 | if ! command -v java > /dev/null; then \ 21 | echo "Java not found in parent image, installing..." && \ 22 | sudo apt-get install -y --no-install-recommends --no-upgrade openjdk-11-jre; \ 23 | fi && \ 24 | sudo rm -rf /var/lib/apt/lists/* 25 | 26 | # Below is setup to allow xvfb to start when the container starts up. 27 | # The label in particular allows this image to override what CircleCI does 28 | # when booting the image. 29 | LABEL com.circleci.preserve-entrypoint=true 30 | ENV DISPLAY=":99" 31 | #RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint && \ 32 | # chmod +x /tmp/entrypoint && \ 33 | # sudo mv /tmp/entrypoint /docker-entrypoint.sh 34 | RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' | sudo tee /docker-entrypoint.sh && \ 35 | sudo chmod +x /docker-entrypoint.sh 36 | 37 | # Install a single version of Firefox. This isn't intended to be a regularly 38 | # updated thing. Instead, if this version of Firefox isn't what the end user 39 | # wants they should install a different version via the Browser Tools Orb. 40 | # 41 | # Canonical made a major technology change in how Firefox is installed from 42 | # Ubuntu 21.10 and up. The general CI space doesn't seem to be ready for a snap 43 | # based Firefox right now so we are installing it from the Mozilla PPA. 44 | RUN echo 'Package: *' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 45 | echo 'Pin: release o=LP-PPA-mozillateam' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 46 | echo 'Pin-Priority: 1001' | sudo tee -a /etc/apt/preferences.d/firefox.pref && \ 47 | sudo add-apt-repository --yes ppa:mozillateam/ppa && \ 48 | sudo apt-get install --no-install-recommends --yes firefox && \ 49 | sudo rm -rf /var/lib/apt/lists/* && \ 50 | firefox --version 51 | 52 | # Install a single version of Google Chrome Stable. This isn't intended to be a 53 | # regularly updated thing. Instead, if this version of Chrome isn't what the 54 | # end user wants they should install a different version via the Browser Tools 55 | # Orb. 56 | RUN wget -q -O - "https://dl.google.com/linux/linux_signing_key.pub" | sudo apt-key add - && \ 57 | echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list && \ 58 | sudo apt-get update && \ 59 | sudo apt-get install google-chrome-stable && \ 60 | sudo rm -rf /var/lib/apt/lists/* 61 | 62 | ENTRYPOINT ["/docker-entrypoint.sh"] 63 | CMD ["/bin/sh"] 64 | -------------------------------------------------------------------------------- /3.4/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/ruby:3.4.4 4 | 5 | LABEL maintainer="Community & Partner Engineering Team " 6 | 7 | # Dockerfile will pull the latest LTS release from cimg-node. 8 | RUN curl -sSL "https://raw.githubusercontent.com/CircleCI-Public/cimg-node/main/ALIASES" -o nodeAliases.txt && \ 9 | NODE_VERSION=$(grep "lts" ./nodeAliases.txt | cut -d "=" -f 2-) && \ 10 | [[ $(uname -m) == "x86_64" ]] && ARCH="x64" || ARCH="arm64" && \ 11 | curl -L -o node.tar.xz "https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${ARCH}.tar.xz" && \ 12 | sudo tar -xJf node.tar.xz -C /usr/local --strip-components=1 && \ 13 | rm node.tar.xz nodeAliases.txt && \ 14 | sudo ln -s /usr/local/bin/node /usr/local/bin/nodejs 15 | 16 | ENV YARN_VERSION 1.22.19 17 | RUN curl -L -o yarn.tar.gz "https://yarnpkg.com/downloads/${YARN_VERSION}/yarn-v${YARN_VERSION}.tar.gz" && \ 18 | sudo tar -xzf yarn.tar.gz -C /opt/ && \ 19 | rm yarn.tar.gz && \ 20 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarn /usr/local/bin/yarn && \ 21 | sudo ln -s /opt/yarn-v${YARN_VERSION}/bin/yarnpkg /usr/local/bin/yarnpkg 22 | -------------------------------------------------------------------------------- /Dockerfile.template: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | # Do not edit individual Dockerfiles manually. Instead, please make changes to the Dockerfile.template, which will be used by the build script to generate Dockerfiles. 4 | 5 | # By policy, the base image tag should be a quarterly tag unless there's a 6 | # specific reason to use a different one. This means January, April, July, or 7 | # October. 8 | 9 | FROM cimg/%%PARENT%%:2024.02 10 | 11 | LABEL maintainer="CircleCI Execution Team " 12 | 13 | ENV RUBY_VERSION=%%VERSION_FULL%% \ 14 | RUBY_MAJOR=%%VERSION_MINOR%% 15 | 16 | RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \ 17 | autoconf \ 18 | bison \ 19 | dpkg-dev \ 20 | # Rails dep 21 | ffmpeg \ 22 | # until the base image has it 23 | libcurl4-openssl-dev \ 24 | libffi-dev \ 25 | libgdbm6 \ 26 | libgdbm-dev \ 27 | # Rails dep 28 | libmysqlclient-dev \ 29 | libncurses5-dev \ 30 | # Rails dep 31 | libpq-dev \ 32 | libreadline6-dev \ 33 | # install libsqlite3-dev until the base image has it 34 | # Rails dep 35 | libsqlite3-dev \ 36 | libssl-dev \ 37 | # Rails dep 38 | libxml2-dev \ 39 | libyaml-dev \ 40 | # Rails dep 41 | memcached \ 42 | # Rails dep 43 | mupdf \ 44 | # Rails dep 45 | mupdf-tools \ 46 | # Rails dep 47 | imagemagick \ 48 | # Rails dep 49 | sqlite3 \ 50 | zlib1g-dev \ 51 | # YJIT dep 52 | rustc \ 53 | # Jemalloc 54 | libjemalloc-dev \ 55 | # Build gems with Rust extensions dep 56 | clang-14 && \ 57 | # For Ruby 3.0 install OpenSSL 1.1.1 to make it work on Ubuntu 20.04 58 | if [ "${RUBY_MAJOR}" == "3.0" ]; then \ 59 | if [[ $(uname -m) == "x86_64" ]]; then \ 60 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_amd64.deb; \ 61 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_amd64.deb; \ 62 | wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb; \ 63 | else \ 64 | wget http://ports.ubuntu.com/pool/main/o/openssl/openssl_1.1.1f-1ubuntu2_arm64.deb; \ 65 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2_arm64.deb; \ 66 | wget http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_arm64.deb; \ 67 | fi && \ 68 | sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2*.deb; \ 69 | sudo dpkg -i libssl-dev_1.1.1f-1ubuntu2*.deb; \ 70 | sudo dpkg -i openssl_1.1.1f-1ubuntu2*.deb; \ 71 | rm -f *.deb; \ 72 | fi && \ 73 | # Skip installing gem docs 74 | echo "gem: --no-document" > ~/.gemrc && \ 75 | mkdir -p ~/ruby && \ 76 | downloadURL="https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR}/ruby-$RUBY_VERSION.tar.gz" && \ 77 | curl -sSL $downloadURL | tar -xz -C ~/ruby --strip-components=1 && \ 78 | cd ~/ruby && \ 79 | autoconf && \ 80 | ./configure --enable-yjit --enable-shared --disable-install-doc && \ 81 | make -j "$(nproc)" && \ 82 | sudo make install && \ 83 | mkdir ~/.rubygems && \ 84 | sudo rm -rf ~/ruby /var/lib/apt/lists/* && \ 85 | cd && \ 86 | # Check that installs succeeded 87 | ruby --version && \ 88 | gem --version && \ 89 | MAKEFLAGS=-j"$(nproc)" sudo gem update --system && \ 90 | gem --version && \ 91 | bundle --version && \ 92 | # Cleanup YJIT install deps 93 | sudo apt-get remove rustc libstd-rust* 94 | 95 | ENV GEM_HOME=/home/circleci/.rubygems 96 | ENV PATH=$GEM_HOME/bin:$BUNDLE_PATH/gems/bin:$PATH 97 | -------------------------------------------------------------------------------- /GEN-CHECK: -------------------------------------------------------------------------------- 1 | GEN_CHECK=(3.4.4) 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Circle Internet Services, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |

3 | CircleCI Logo 4 | Docker Logo 5 | Ruby Logo 6 |

7 |

CircleCI Convenience Images => Ruby

8 |

A Continuous Integration focused Ruby Docker image built to run on CircleCI

9 |
10 | 11 | [![CircleCI Build Status](https://circleci.com/gh/CircleCI-Public/cimg-ruby.svg?style=shield)](https://circleci.com/gh/CircleCI-Public/cimg-ruby) [![Software License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/CircleCI-Public/cimg-ruby/main/LICENSE) [![Docker Pulls](https://img.shields.io/docker/pulls/cimg/ruby)](https://hub.docker.com/r/cimg/ruby) [![CircleCI Community](https://img.shields.io/badge/community-CircleCI%20Discuss-343434.svg)](https://discuss.circleci.com/c/ecosystem/circleci-images) [![Repository](https://img.shields.io/badge/github-README-brightgreen)](https://github.com/CircleCI-Public/cimg-ruby) 12 | 13 | **_This image is designed to supercede the legacy CircleCI Ruby image, `circleci/ruby`._** 14 | 15 | `cimg/ruby` is a Docker image created by CircleCI with continuous integration builds in mind. 16 | Each tag contains a complete Ruby version, the `gem` command, Bundler, and any binaries and tools that are required for builds to complete successfully in a CircleCI environment. 17 | 18 | ## Support Policy 19 | 20 | The CircleCI Docker Convenience Image support policy can be found on the [CircleCI docs](https://circleci.com/docs/convenience-images-support-policy) site. This policy outlines the release, update, and deprecation policy for CircleCI Docker Convenience Images. 21 | 22 | ## Table of Contents 23 | 24 | - [Getting Started](#getting-started) 25 | - [How This Image Works](#how-this-image-works) 26 | - [Development](#development) 27 | - [Contributing](#contributing) 28 | - [Additional Resources](#additional-resources) 29 | - [License](#license) 30 | 31 | ## Getting Started 32 | 33 | This image can be used with the CircleCI `docker` executor. 34 | For example: 35 | 36 | ```yaml 37 | jobs: 38 | build: 39 | docker: 40 | - image: cimg/ruby:3.2.2 41 | steps: 42 | - checkout 43 | - run: ruby --version 44 | ``` 45 | 46 | In the above example, the CircleCI Ruby Docker image is used for the primary container. 47 | More specifically, the tag `3.2.2` is used meaning the version of Ruby will be Ruby v3.2.2. 48 | You can now use Ruby within the steps for this job. 49 | 50 | ## How This Image Works 51 | 52 | This image contains the Ruby programming language. 53 | This includes the `gem` command as well as Bundler pre-installed. 54 | 55 | ### Variants 56 | 57 | Variant images typically contain the same base software, but with a few additional modifications. 58 | 59 | #### Node.js 60 | 61 | The Node.js variant is the same Ruby image but with Node.js also installed. 62 | The Node.js variant can be used by appending `-node` to the end of an existing `cimg/ruby` tag. 63 | 64 | ```yaml 65 | jobs: 66 | build: 67 | docker: 68 | - image: cimg/ruby:3.2-node 69 | steps: 70 | - checkout 71 | - run: ruby --version 72 | - run: node --version 73 | ``` 74 | 75 | #### Browsers 76 | 77 | The browsers variant is the same Ruby image but with Node.js, Java, Selenium, and browser dependencies pre-installed via apt. 78 | The browsers variant can be used by appending `-browser` to the end of an existing `cimg/ruby` tag. 79 | The browsers variant is designed to work in conjunction with the [CircleCI Browser Tools orb](https://circleci.com/developer/orbs/orb/circleci/browser-tools). 80 | You can use the orb to install a version of Google Chrome and/or Firefox into your build. The image contains all of the supporting tools needed to use both the browser and its driver. 81 | 82 | ```yaml 83 | orbs: 84 | browser-tools: circleci/browser-tools@1.4.6 85 | jobs: 86 | build: 87 | docker: 88 | - image: cimg/ruby:3.2-browsers 89 | steps: 90 | - browser-tools/install-browser-tools 91 | - checkout 92 | - run: | 93 | ruby --version 94 | node --version 95 | java --version 96 | google-chrome --version 97 | ``` 98 | 99 | ### Tagging Scheme 100 | 101 | This image has the following tagging scheme: 102 | 103 | ``` 104 | cimg/ruby:[-variant] 105 | ``` 106 | 107 | `` - The version of Ruby to use. 108 | This can be a full SemVer point release (such as `3.2.0`) or just the minor release (such as `3.2`). 109 | If you use the minor release tag, it will automatically point to future patch updates as they are released. 110 | For example, the tag `3.2` points to Ruby v3.2.0 now, but when the next release comes out, it will point to Ruby v3.2.1. 111 | 112 | `[-variant]` - Variant tags, if available, can optionally be used. 113 | For example, the Node.js variant can be used like this: `cimg/ruby:3.2.0-node`. 114 | 115 | ## Development 116 | 117 | Images can be built and run locally with this repository. 118 | This has the following requirements: 119 | 120 | - local machine of Linux (Ubuntu tested) or macOS 121 | - modern version of Bash (v4+) 122 | - modern version of Docker Engine (v19.03+) 123 | 124 | ### Cloning For Community Users (no write access to this repository) 125 | 126 | Fork this repository on GitHub. 127 | When you get your clone URL, you'll want to add `--recurse-submodules` to the clone command in order to populate the Git submodule contained in this repo. 128 | It would look something like this: 129 | 130 | ```bash 131 | git clone --recurse-submodules 132 | ``` 133 | 134 | If you missed this step and already cloned, you can just run `git submodule update --init --recursive` to populate the submodule. 135 | Then you can optionally add this repo as an upstream to your own: 136 | 137 | ```bash 138 | git remote add upstream https://github.com/CircleCI-Public/cimg-ruby.git 139 | ``` 140 | 141 | ### Cloning For Maintainers ( you have write access to this repository) 142 | 143 | Clone the project with the following command so that you populate the submodule: 144 | 145 | ```bash 146 | git clone --recurse-submodules git@github.com:CircleCI-Public/cimg-ruby.git 147 | ``` 148 | 149 | ### Generating Dockerfiles 150 | 151 | Dockerfiles can be generated for a specific Ruby version using the `gen-dockerfiles.sh` script. 152 | For example, to generate the Dockerfile for Ruby v3.2.0, you would run the following from the root of the repo: 153 | 154 | ```bash 155 | ./shared/gen-dockerfiles.sh 3.2.0 156 | ``` 157 | 158 | The generated Dockerfile will be located at `./3.2/Dockefile`. 159 | To build this image locally and try it out, you can run the following: 160 | 161 | ```bash 162 | cd 3.2/ 163 | docker build -t test/ruby:3.2.0 . 164 | docker run -it test/ruby:3.2.0 bash 165 | ``` 166 | 167 | ### Building the Dockerfiles 168 | 169 | To build the Docker images locally as this repository does, you'll want to run the `build-images.sh` script: 170 | 171 | ```bash 172 | ./build-images.sh 173 | ``` 174 | 175 | This would need to be run after generating the Dockerfiles first. 176 | When releasing proper images for CircleCI, this script is run from a CircleCI pipeline and not locally. 177 | 178 | ### Publishing Official Images (for Maintainers only) 179 | 180 | The individual scripts (above) can be used to create the correct files for an image, and then added to a new git branch, committed, etc. 181 | A release script is included to make this process easier. 182 | To make a proper release for this image, let's use the fake Ruby version of v9.99, you would run the following from the repo root: 183 | 184 | ```bash 185 | ./shared/release.sh 9.99 186 | ``` 187 | 188 | This will automatically create a new Git branch, generate the Dockerfile(s), stage the changes, commit them, and push them to GitHub. 189 | The commit message will end with the string `[release]`. 190 | This string is used by CircleCI to know when to push images to Docker Hub. 191 | All that would need to be done after that is: 192 | 193 | - wait for build to pass on CircleCI 194 | - review the PR 195 | - merge the PR 196 | 197 | The main branch build will then publish a release. 198 | 199 | ### Incorporating Changes 200 | 201 | How changes are incorporated into this image depends on where they come from. 202 | 203 | **build scripts** - Changes within the `./shared` submodule happen in its [own repository](https://github.com/CircleCI-Public/cimg-shared). 204 | For those changes to affect this image, the submodule needs to be updated. 205 | Typically like this: 206 | 207 | ```bash 208 | cd shared 209 | git pull 210 | cd .. 211 | git add shared 212 | git commit -m "Updating submodule for foo." 213 | ``` 214 | 215 | **parent image** - By design, when changes happen to a parent image, they don't appear in existing Ruby images. 216 | This is to aid in "determinism" and prevent breaking customer builds. 217 | New Ruby images/versions though will automatically pick up the changes. 218 | 219 | If you _really_ want to publish changes from a parent image into the Ruby image, you have to build a specific image version as if it was a new image. 220 | This will create a new Dockerfile and once published, a new image. 221 | 222 | **Ruby specific changes** - Editing the `Dockerfile.template` file in this repo is how to modify the Ruby image specifically. 223 | Don't forget that to see any of these changes locally, the `gen-dockerfiles.sh` script will need to be run again (see above). 224 | 225 | ## Contributing 226 | 227 | We encourage [issues](https://github.com/CircleCI-Public/cimg-ruby/issues) and [pull requests](https://github.com/CircleCI-Public/cimg-ruby/pulls) against this repository. 228 | 229 | Please check out our [contributing guide](.github/CONTRIBUTING.md) which outlines best practices for contributions and what you can expect from the images team at CircleCI. 230 | 231 | ## Additional Resources 232 | 233 | [CircleCI Docs](https://circleci.com/docs/) - The official CircleCI Documentation website. 234 | [CircleCI Configuration Reference](https://circleci.com/docs/2.0/configuration-reference/#section=configuration) - From CircleCI Docs, the configuration reference page is one of the most useful pages we have. 235 | It will list all of the keys and values supported in `.circleci/config.yml`. 236 | [Docker Docs](https://docs.docker.com/) - For simple projects this won't be needed but if you want to dive deeper into learning Docker, this is a great resource. 237 | 238 | ## License 239 | 240 | This repository is licensed under the MIT license. 241 | The license can be found [here](./LICENSE). 242 | -------------------------------------------------------------------------------- /build-images.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Do not edit by hand; please use build scripts/templates to make changes 3 | set -eo pipefail 4 | 5 | docker context create cimg 6 | docker buildx create --use cimg 7 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.4/Dockerfile -t cimg/ruby:3.4.4 -t cimg/ruby:3.4 --push . 8 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.4/node/Dockerfile -t cimg/ruby:3.4.4-node -t cimg/ruby:3.4-node --push . 9 | docker buildx build --platform=linux/amd64 --file 3.4/browsers/Dockerfile -t cimg/ruby:3.4.4-browsers -t cimg/ruby:3.4-browsers --push . 10 | -------------------------------------------------------------------------------- /img/circle-circleci.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 49 | 51 | 52 | 54 | image/svg+xml 55 | 57 | 58 | 59 | 60 | 61 | 66 | 72 | 78 | 84 | 90 | 96 | 102 | 108 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /img/circle-docker.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 25 | 28 | 35 | 39 | 40 | 41 | 44 | 45 | 70 | 72 | 73 | 75 | image/svg+xml 76 | 78 | 79 | 80 | 81 | 82 | 87 | 93 | 99 | 105 | 111 | 117 | 123 | 129 | 132 | 134 | 138 | 139 | 140 | 141 | 143 | 152 | 153 | 154 | 155 | 163 | 164 | 165 | 166 | 176 | 177 | -------------------------------------------------------------------------------- /img/circle-ruby.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 24 | 27 | 34 | 38 | 39 | 42 | 45 | 50 | 51 | 60 | 64 | 68 | 72 | 76 | 80 | 81 | 84 | 89 | 90 | 99 | 103 | 107 | 111 | 115 | 116 | 119 | 124 | 125 | 134 | 138 | 142 | 146 | 150 | 151 | 154 | 159 | 160 | 169 | 173 | 177 | 181 | 185 | 189 | 193 | 194 | 197 | 202 | 203 | 212 | 216 | 220 | 224 | 228 | 232 | 236 | 237 | 240 | 245 | 246 | 255 | 259 | 263 | 267 | 271 | 275 | 279 | 280 | 283 | 288 | 289 | 298 | 302 | 306 | 310 | 314 | 318 | 319 | 322 | 327 | 328 | 337 | 341 | 345 | 349 | 353 | 357 | 358 | 361 | 366 | 367 | 376 | 380 | 384 | 388 | 392 | 396 | 400 | 404 | 408 | 412 | 416 | 417 | 420 | 425 | 426 | 435 | 439 | 443 | 447 | 451 | 455 | 456 | 459 | 464 | 465 | 474 | 478 | 482 | 486 | 490 | 491 | 494 | 499 | 500 | 509 | 513 | 517 | 521 | 525 | 526 | 529 | 534 | 535 | 545 | 549 | 553 | 557 | 561 | 562 | 565 | 570 | 571 | 581 | 585 | 589 | 593 | 597 | 598 | 601 | 606 | 607 | 616 | 620 | 624 | 628 | 632 | 636 | 637 | 640 | 645 | 646 | 655 | 659 | 663 | 667 | 671 | 675 | 676 | 677 | 702 | 704 | 705 | 707 | image/svg+xml 708 | 710 | 711 | 712 | 713 | 714 | 719 | 725 | 731 | 737 | 743 | 749 | 755 | 761 | 765 | 768 | 771 | 773 | 775 | 780 | 781 | 782 | 783 | 784 | 787 | 790 | 792 | 794 | 799 | 800 | 801 | 802 | 803 | 806 | 809 | 811 | 813 | 818 | 819 | 820 | 821 | 822 | 825 | 828 | 830 | 832 | 837 | 838 | 839 | 840 | 841 | 844 | 847 | 849 | 851 | 856 | 857 | 858 | 859 | 860 | 863 | 866 | 868 | 870 | 875 | 876 | 877 | 878 | 879 | 882 | 885 | 887 | 889 | 894 | 895 | 896 | 897 | 898 | 901 | 904 | 906 | 908 | 913 | 914 | 915 | 916 | 917 | 920 | 925 | 927 | 930 | 932 | 934 | 939 | 940 | 941 | 942 | 943 | 945 | 948 | 950 | 952 | 957 | 958 | 959 | 960 | 961 | 963 | 966 | 968 | 970 | 975 | 976 | 977 | 978 | 979 | 981 | 984 | 986 | 988 | 993 | 994 | 995 | 996 | 997 | 1002 | 1004 | 1007 | 1009 | 1011 | 1016 | 1017 | 1018 | 1019 | 1020 | 1022 | 1025 | 1027 | 1029 | 1034 | 1035 | 1036 | 1037 | 1038 | 1040 | 1043 | 1045 | 1047 | 1052 | 1053 | 1054 | 1055 | 1056 | 1058 | 1061 | 1063 | 1065 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | 1077 | 1087 | 1088 | -------------------------------------------------------------------------------- /manifest: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | repository=ruby 4 | parent=base 5 | variants=(node browsers) 6 | namespace=cimg 7 | arm64=1 8 | -------------------------------------------------------------------------------- /push-images.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Do not edit by hand; please use build scripts/templates to make changes 3 | set -eo pipefail 4 | -------------------------------------------------------------------------------- /rubyFeed.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | vers=() 3 | 4 | if [ -f shared/automated-updates.sh ]; then 5 | source shared/automated-updates.sh 6 | else 7 | echo "Check if submodule was loaded; automated-updates.sh is missing" 8 | exit 1 9 | fi 10 | 11 | 12 | getRubyVersion() { 13 | RSS_URL="https://github.com/ruby/ruby/tags.atom" 14 | VERSIONS=$(curl --silent "$RSS_URL" | grep -E '(title)' | tail -n +2 | sed -e 's/^[ \t]*//' | sed -e 's/[v?]*//' -e 's/<\/title>//') 15 | 16 | for version in $VERSIONS; do 17 | if [[ $version =~ ^[0-9]+(\_[0-9]+)*$ || $version =~ ^[0-9]+(\.[0-9]+)*$ ]]; then 18 | generateVersions "$(echo "$version" | trimmer "v" | sed -r 's/_/./g')" 19 | generateSearchTerms "RUBY_VERSION=" "$majorMinor/Dockerfile" "\\" 20 | directoryCheck "$majorMinor" "$SEARCH_TERM" 21 | if [[ $(eval echo $?) == 0 ]]; then 22 | generateVersionString "$newVersion" 23 | fi 24 | fi 25 | done 26 | } 27 | 28 | getRubyVersion 29 | 30 | if [ -n "${vers[*]}" ]; then 31 | echo "Included version updates: ${vers[*]}" 32 | echo "Running release script" 33 | ./shared/release.sh "${vers[@]}" 34 | else 35 | echo "No new version updates" 36 | exit 0 37 | fi 38 | --------------------------------------------------------------------------------