├── .circleci └── config.yml ├── .github ├── CODEOWNERS ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── cimg-bug-report.md │ ├── cimg-feature-request.md │ └── config.yml └── pull_request_template.md ├── .gitmodules ├── 3.10 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.11 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.12 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.13 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.7 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.8 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── 3.9 ├── Dockerfile ├── browsers │ └── Dockerfile └── node │ └── Dockerfile ├── Dockerfile.template ├── GEN-CHECK ├── LICENSE ├── README.md ├── build-images.sh ├── img ├── circle-circleci.svg ├── circle-docker.svg └── circle-python.svg ├── manifest ├── push-images.sh ├── python-hashes.sh └── pythonFeed.sh /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | orbs: 4 | cimg: circleci/cimg@0.6.4 5 | slack: circleci/slack@4.13.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 | pre-steps: 18 | - run: echo 'export PYENV_ROOT=/home/circleci/.pyenv' >> "$BASH_ENV" 19 | - run: echo 'export PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:$PATH' >> "$BASH_ENV" 20 | - run: curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash 21 | 22 | update-script: pythonFeed.sh 23 | context: 24 | - slack-notification-access-token 25 | - slack-cimg-notifications 26 | - cpe-image-bot-github-creds 27 | main-wf: 28 | when: 29 | not: << pipeline.parameters.cron >> 30 | jobs: 31 | - cimg/build-and-deploy: 32 | name: "Test" 33 | resource-class: 2xlarge+ 34 | docker-namespace: ccitest 35 | docker-repository: python 36 | filters: 37 | branches: 38 | ignore: 39 | - main 40 | context: 41 | - slack-notification-access-token 42 | - slack-cimg-notifications 43 | - cimg-docker-image-building 44 | post-steps: 45 | - slack/notify: 46 | branch_pattern: main 47 | event: fail 48 | mentions: "@images" 49 | template: basic_fail_1 50 | - cimg/build-and-deploy: 51 | name: "Deploy" 52 | resource-class: 2xlarge+ 53 | docker-repository: python 54 | filters: 55 | branches: 56 | only: 57 | - main 58 | context: 59 | - slack-notification-access-token 60 | - slack-cimg-notifications 61 | - cimg-docker-image-building 62 | - cimg-docker-image-publishing 63 | post-steps: 64 | - slack/notify: 65 | branch_pattern: main 66 | event: fail 67 | mentions: "@images" 68 | template: basic_fail_1 69 | -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /3.10/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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.10.18 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.10.18 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.10.18 && pyenv global 3.10.18 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | 58 | # This installs uv at the latest version. 59 | RUN curl -LsSf https://astral.sh/uv/install.sh | sh -------------------------------------------------------------------------------- /3.10/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.10.18-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.10/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.10.18 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.11/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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.11.13 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.11.13 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.11.13 && pyenv global 3.11.13 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | 58 | # This installs uv at the latest version. 59 | RUN curl -LsSf https://astral.sh/uv/install.sh | sh -------------------------------------------------------------------------------- /3.11/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.11.13-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.11/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.11.13 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.12/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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.12.11 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.12.11 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.12.11 && pyenv global 3.12.11 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | 58 | # This installs uv at the latest version. 59 | RUN curl -LsSf https://astral.sh/uv/install.sh | sh -------------------------------------------------------------------------------- /3.12/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.12.11-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.12/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.12.11 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.13/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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.13.4 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.13.4 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.13.4 && pyenv global 3.13.4 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | 58 | # This installs uv at the latest version. 59 | RUN curl -LsSf https://astral.sh/uv/install.sh | sh -------------------------------------------------------------------------------- /3.13/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.13.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.13/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.13.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 | -------------------------------------------------------------------------------- /3.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 | FROM cimg/base:2023.01 10 | 11 | LABEL maintainer="Community/Partner Engineering " 12 | 13 | ENV PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.7.17 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.7.17 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.7.17 && pyenv global 3.7.17 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | -------------------------------------------------------------------------------- /3.7/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.7.17-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.7/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.7.17 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.19 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.8/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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.8.20 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.8.20 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.8.20 && pyenv global 3.8.20 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | -------------------------------------------------------------------------------- /3.8/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.8.20-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.8/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.8.20 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.9/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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=3.9.23 \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=3.9.23 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install 3.9.23 && pyenv global 3.9.23 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | 58 | # This installs uv at the latest version. 59 | RUN curl -LsSf https://astral.sh/uv/install.sh | sh -------------------------------------------------------------------------------- /3.9/browsers/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.9.23-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.9/node/Dockerfile: -------------------------------------------------------------------------------- 1 | # vim:set ft=dockerfile: 2 | 3 | FROM cimg/python:3.9.23 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 PYENV_ROOT=/home/circleci/.pyenv \ 14 | PATH=/home/circleci/.pyenv/shims:/home/circleci/.pyenv/bin:/home/circleci/.poetry/bin:$PATH \ 15 | PYTHON_VERSION=%%VERSION_FULL%% \ 16 | PIPENV_DEFAULT_PYTHON_VERSION=%%VERSION_FULL%% 17 | 18 | RUN sudo apt-get update && sudo apt-get install -y \ 19 | build-essential \ 20 | ca-certificates \ 21 | curl \ 22 | git \ 23 | libbz2-dev \ 24 | liblzma-dev \ 25 | libncurses5-dev \ 26 | libncursesw5-dev \ 27 | libreadline-dev \ 28 | libffi-dev \ 29 | libsqlite3-dev \ 30 | libssl-dev \ 31 | libxml2-dev \ 32 | libxmlsec1-dev \ 33 | llvm \ 34 | make \ 35 | python3-openssl \ 36 | tk-dev \ 37 | wget \ 38 | xz-utils \ 39 | zlib1g-dev && \ 40 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash && \ 41 | sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 42 | 43 | RUN env PYTHON_CONFIGURE_OPTS="--enable-shared --enable-optimizations" pyenv install %%MAIN_VERSION%% && pyenv global %%MAIN_VERSION%% 44 | 45 | RUN python --version && \ 46 | pip --version && \ 47 | pip install --upgrade pip && \ 48 | pip --version && \ 49 | # This installs pipenv at the latest version 50 | pip install pipenv wheel && \ 51 | pipenv --version && \ 52 | # Install pipx 53 | pip install --user pipx 54 | 55 | # This installs version poetry at the latest version. poetry is updated about twice a month. 56 | RUN curl -sSL https://install.python-poetry.org | python - 57 | 58 | # This installs uv at the latest version. 59 | RUN curl -LsSf https://astral.sh/uv/install.sh | sh -------------------------------------------------------------------------------- /GEN-CHECK: -------------------------------------------------------------------------------- 1 | GEN_CHECK=(3.13.4 3.12.11 3.11.13 3.10.18 3.9.23) 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 | Python Logo 6 |

7 |

CircleCI Convenience Images => Python

8 |

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

9 |
10 | 11 | [![CircleCI Build Status](https://circleci.com/gh/CircleCI-Public/cimg-python.svg?style=shield)](https://circleci.com/gh/CircleCI-Public/cimg-python) [![Software License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/CircleCI-Public/cimg-python/master/LICENSE) [![Docker Pulls](https://img.shields.io/docker/pulls/cimg/python)](https://hub.docker.com/r/cimg/python) [![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-python) 12 | 13 | ***This image is designed to supercede the legacy CircleCI Python image, `circleci/python`.*** 14 | 15 | `cimg/python` is a Docker image created by CircleCI with continuous integration builds in mind. 16 | Each tag contains a complete Python version via pyenv. 17 | pip, pipenv, poetry and uv are pre-installed, and any binaries and tools that are required for builds to complete successfully in a CircleCI environment. 18 | 19 | ## Support Policy 20 | 21 | 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. 22 | 23 | ## Table of Contents 24 | 25 | - [Getting Started](#getting-started) 26 | - [How This Image Works](#how-this-image-works) 27 | - [Development](#development) 28 | - [Contributing](#contributing) 29 | - [Additional Resources](#additional-resources) 30 | - [License](#license) 31 | 32 | 33 | ## Getting Started 34 | 35 | This image can be used with the CircleCI `docker` executor. 36 | For example: 37 | 38 | ```yaml 39 | jobs: 40 | build: 41 | docker: 42 | - image: cimg/python:3.8 43 | steps: 44 | - checkout 45 | - run: python --version 46 | ``` 47 | 48 | In the above example, the CircleCI Python Docker image is used as the primary container. 49 | More specifically, the tag `3.8` is used meaning the version of Python will be Python v3.8. 50 | You can now use Python within the steps for this job. 51 | 52 | 53 | ## How This Image Works 54 | 55 | This image contains the Python programming language as well as pip, pipenv, poetry and uv. 56 | The interpreter is provided via pyenv allowing you to change the Python version during a build as well. 57 | 58 | ### Variants 59 | 60 | Variant images typically contain the same base software, but with a few additional modifications. 61 | 62 | #### Node.js 63 | 64 | The Node.js variant is the same Python image but with Node.js also installed. 65 | The Node.js variant can be used by appending `-node` to the end of an existing `cimg/python` tag. 66 | 67 | ```yaml 68 | jobs: 69 | build: 70 | docker: 71 | - image: cimg/python:3.7-node 72 | steps: 73 | - checkout 74 | - run: python --version 75 | - run: node --version 76 | ``` 77 | 78 | #### Browsers 79 | 80 | The browsers variant is the same Python image but with Node.js, Java, Selenium, and browser dependencies pre-installed via apt. 81 | The browsers variant can be used by appending `-browser` to the end of an existing `cimg/python` tag. 82 | The browsers variant is designed to work in conjunction with the [CircleCI Browser Tools orb](https://circleci.com/developer/orbs/orb/circleci/browser-tools). 83 | 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. 84 | 85 | ```yaml 86 | orbs: 87 | browser-tools: circleci/browser-tools@1.1 88 | 89 | jobs: 90 | build: 91 | docker: 92 | - image: cimg/python:3.7-browsers 93 | steps: 94 | - browser-tools/install-browser-tools 95 | - checkout 96 | - run: | 97 | python --version 98 | node --version 99 | java --version 100 | google-chrome --version 101 | ``` 102 | 103 | ### Tagging Scheme 104 | 105 | This image has the following tagging scheme: 106 | 107 | ``` 108 | cimg/python:[-variant] 109 | ``` 110 | 111 | `` - The version of Python to use. 112 | This can be a full SemVer point release (such as `3.8.1`) or just the minor release (such as `3.8`). 113 | If you use the minor release tag, it will automatically point to future patch updates as they are released by the Python project. 114 | For example, the tag `3.8` points to Python v3.8.5 now, but when the next release comes out, it will point to Python v3.8.6. 115 | 116 | `[-variant]` - Variant tags, if available, can optionally be used. 117 | For example, the Node.js variant could be used like this: `cimg/python:3.7-node`. 118 | 119 | 120 | ## Development 121 | 122 | Images can be built and run locally with this repository. 123 | This has the following requirements: 124 | 125 | - local machine of Linux (Ubuntu tested) or macOS 126 | - modern version of Bash (v4+) 127 | - modern version of Docker Engine (v19.03+) 128 | 129 | ### Cloning For Community Users (no write access to this repository) 130 | 131 | Fork this repository on GitHub. 132 | 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. 133 | It would look something like this: 134 | 135 | ```bash 136 | git clone --recurse-submodules 137 | ``` 138 | 139 | If you missed this step and already cloned, you can just run `git submodule update --recursive` to populate the submodule. 140 | Then you can optionally add this repo as an upstream to your own: 141 | 142 | ```bash 143 | git remote add upstream https://github.com/CircleCI-Public/cimg-python.git 144 | ``` 145 | 146 | ### Cloning For Maintainers ( you have write access to this repository) 147 | 148 | Clone the project with the following command so that you populate the submodule: 149 | 150 | ```bash 151 | git clone --recurse-submodules git@github.com:CircleCI-Public/cimg-python.git 152 | ``` 153 | 154 | ### Generating Dockerfiles 155 | 156 | Dockerfiles can be generated for a specific Python version using the `gen-dockerfiles.sh` script. 157 | For example, to generate the Dockerfile for Python v3.7.7, you would run the following from the root of the repo: 158 | 159 | ```bash 160 | ./shared/gen-dockerfiles.sh 3.7.7 161 | ``` 162 | 163 | The generated Dockerfile will be located at `./3.7/Dockefile`. 164 | To build this image locally and try it out, you can run the following: 165 | 166 | ```bash 167 | cd 3.7 168 | docker build -t test/python:3.7.7 . 169 | docker run -it test/python:3.7.7 bash 170 | ``` 171 | 172 | ### Building the Dockerfiles 173 | 174 | To build the Docker images locally as this repository does, you'll want to run the `build-images.sh` script: 175 | 176 | ```bash 177 | ./build-images.sh 178 | ``` 179 | 180 | This would need to be run after generating the Dockerfiles first. 181 | When releasing proper images for CircleCI, this script is run from a CircleCI pipeline and not locally. 182 | 183 | 184 | ### Submitting a Pull Request 185 | 186 | Ensure all the changes to the versioned Dockerfiles and the `build-images.sh` have been reverted, leaving only the `Dockerfile.template` as the modified file. These will have been modified while testing with the sections above. 187 | The specific versions will be included when the images are released. 188 | 189 | ### Publishing Official Images (for Maintainers only) 190 | 191 | 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. 192 | A release script is included to make this process easier. 193 | To make a proper release for this image, let's use the fake Python version of v99.9.9, you would run the following from the repo root: 194 | 195 | ```bash 196 | ./shared/release.sh 99.9.9 197 | ``` 198 | 199 | This will automatically create a new Git branch, generate the Dockerfile(s), stage the changes, commit them, and push them to GitHub. 200 | The commit message will end with the string `[release]`. 201 | This string is used by CircleCI to know when to push images to Docker Hub. 202 | All that would need to be done after that is: 203 | 204 | - wait for build to pass on CircleCI 205 | - review the PR 206 | - merge the PR 207 | 208 | The main branch build will then publish a release. 209 | 210 | ### Incorporating Changes 211 | 212 | How changes are incorporated into this image depends on where they come from. 213 | 214 | **build scripts** - Changes within the `./shared` submodule happen in its [own repository](https://github.com/CircleCI-Public/cimg-shared). 215 | For those changes to affect this image, the submodule needs to be updated. 216 | Typically like this: 217 | 218 | ```bash 219 | cd shared 220 | git pull 221 | cd .. 222 | git add shared 223 | git commit -m "Updating submodule for foo." 224 | ``` 225 | 226 | **parent image** - By design, when changes happen to a parent image, they don't appear in existing Python images. 227 | This is to aid in "determinism" and prevent breaking customer builds. 228 | New Python images will automatically pick up the changes. 229 | 230 | If you *really* want to publish changes from a parent image into the Python image, you have to build a specific image version as if it was a new image. 231 | This will create a new Dockerfile and once published, a new image. 232 | 233 | **Python specific changes** - Editing the `Dockerfile.template` file in this repo is how to modify the Python image specifically. 234 | Don't forget that to see any of these changes locally, the `gen-dockerfiles.sh` script will need to be run again (see above). 235 | 236 | 237 | ## Contributing 238 | 239 | We encourage [issues](https://github.com/CircleCI-Public/cimg-python/issues) and [pull requests](https://github.com/CircleCI-Public/cimg-python/pulls) against this repository. 240 | 241 | 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. 242 | 243 | ## Additional Resources 244 | 245 | [CircleCI Docs](https://circleci.com/docs/) - The official CircleCI Documentation website. 246 | [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. 247 | It will list all of the keys and values supported in `.circleci/config.yml`. 248 | [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. 249 | 250 | 251 | ## License 252 | 253 | This repository is licensed under the MIT license. 254 | The license can be found [here](./LICENSE). 255 | -------------------------------------------------------------------------------- /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.13/Dockerfile -t cimg/python:3.13.4 -t cimg/python:3.13 --push . 8 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.13/node/Dockerfile -t cimg/python:3.13.4-node -t cimg/python:3.13-node --push . 9 | docker buildx build --platform=linux/amd64 --file 3.13/browsers/Dockerfile -t cimg/python:3.13.4-browsers -t cimg/python:3.13-browsers --push . 10 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.12/Dockerfile -t cimg/python:3.12.11 -t cimg/python:3.12 --push . 11 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.12/node/Dockerfile -t cimg/python:3.12.11-node -t cimg/python:3.12-node --push . 12 | docker buildx build --platform=linux/amd64 --file 3.12/browsers/Dockerfile -t cimg/python:3.12.11-browsers -t cimg/python:3.12-browsers --push . 13 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.11/Dockerfile -t cimg/python:3.11.13 -t cimg/python:3.11 --push . 14 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.11/node/Dockerfile -t cimg/python:3.11.13-node -t cimg/python:3.11-node --push . 15 | docker buildx build --platform=linux/amd64 --file 3.11/browsers/Dockerfile -t cimg/python:3.11.13-browsers -t cimg/python:3.11-browsers --push . 16 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.10/Dockerfile -t cimg/python:3.10.18 -t cimg/python:3.10 --push . 17 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.10/node/Dockerfile -t cimg/python:3.10.18-node -t cimg/python:3.10-node --push . 18 | docker buildx build --platform=linux/amd64 --file 3.10/browsers/Dockerfile -t cimg/python:3.10.18-browsers -t cimg/python:3.10-browsers --push . 19 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.9/Dockerfile -t cimg/python:3.9.23 -t cimg/python:3.9 --push . 20 | docker buildx build --platform=linux/amd64,linux/arm64 --file 3.9/node/Dockerfile -t cimg/python:3.9.23-node -t cimg/python:3.9-node --push . 21 | docker buildx build --platform=linux/amd64 --file 3.9/browsers/Dockerfile -t cimg/python:3.9.23-browsers -t cimg/python:3.9-browsers --push . 22 | -------------------------------------------------------------------------------- /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-python.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 23 | 25 | 28 | 35 | 39 | 40 | 43 | 45 | 49 | 53 | 54 | 56 | 60 | 64 | 65 | 67 | 71 | 75 | 76 | 78 | 82 | 86 | 87 | 89 | 93 | 97 | 98 | 100 | 104 | 108 | 109 | 118 | 127 | 137 | 147 | 158 | 159 | 184 | 186 | 187 | 189 | image/svg+xml 190 | 192 | 193 | 194 | 195 | 196 | 201 | 207 | 213 | 219 | 225 | 231 | 237 | 243 | 245 | 250 | 255 | 256 | 257 | 267 | 268 | -------------------------------------------------------------------------------- /manifest: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | repository=python 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 | -------------------------------------------------------------------------------- /python-hashes.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | dURL="https://www.python.org/ftp/python/${1}/Python-${1}" 4 | 5 | echo -e "Python v${1} sha256 hashes\n" 6 | 7 | echo "XZ tarball:" 8 | curl -sSL "${dURL}.tar.xz" | sha256sum 9 | echo "" 10 | 11 | echo "Gzip tarball:" 12 | curl -sSL "${dURL}.tgz" | sha256sum 13 | -------------------------------------------------------------------------------- /pythonFeed.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Update to latest pyenv version 4 | curl -sSL "https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer" | bash 5 | 6 | if [ -f shared/automated-updates.sh ]; then 7 | source shared/automated-updates.sh 8 | else 9 | echo "Check if submodule was loaded; automated-updates.sh is missing" 10 | exit 1 11 | fi 12 | 13 | LATEST_VERSION=0 14 | VERSION_LIST=$(pyenv install --list | sed 's/^ //' | grep '^[3]' | grep --invert-match 'dev\|a\|b\|t') 15 | 16 | getPythonVersionLatest() { 17 | 18 | LATEST_VERSION=$(echo "$VERSION_LIST" | tail -1) 19 | } 20 | 21 | processLastVersion() { 22 | PROCESSED_LATEST_VERSION=$(echo "$LATEST_VERSION" | cut -f1,2 -d'.') 23 | VERSION_LIST=$(echo "$VERSION_LIST" | grep -v "$PROCESSED_LATEST_VERSION") 24 | generateVersions "$LATEST_VERSION" 25 | generateSearchTerms "PYTHON_VERSION" "$majorMinor"/Dockerfile '\' 26 | # shellcheck disable=SC2154 27 | directoryCheck "$majorMinor" "$SEARCH_TERM" 28 | if [[ $(eval echo $?) == 0 ]]; then 29 | echo "$LATEST_VERSION is valid" 30 | VERSIONS+=$LATEST_VERSION 31 | VERSIONS+=' ' 32 | fi 33 | } 34 | 35 | while [ "${PROCESSED_LATEST_VERSION}" != "3.7" ] 36 | do 37 | getPythonVersionLatest 38 | processLastVersion 39 | done 40 | 41 | if [ "$VERSIONS" != "" ]; then 42 | echo "generating cimg-python for versions: $VERSIONS" 43 | ./shared/release.sh $VERSIONS 44 | else 45 | echo "No changes" 46 | fi 47 | --------------------------------------------------------------------------------