atlassian/default-image
The default build environment of Bitbucket Pipelines
50M+
This is the default docker image used as a default build environment in Bitbucket Pipelines.
If you don't specify an image, Bitbucket Pipelines will use the default one when running a build.
Version 4.x (Recommended) platform: ubuntu 22.04 (LTS) wget xvfb curl ssh zip jq tar parallel git: 2.39.1 node: 18.20.6 npm: 9.5.1 nvm: 0.39.2 python: 3.10.6 gcc: 11.3.0 ant: 1.10.12
Version 3.x (Deprecated) platform: ubuntu 20.04 (LTS) wget xvfb curl ssh zip jq tar parallel git: 2.39.1 node: 14.17.5 npm: 6.14.14 nvm: 0.38.0 python: 3.8.10 gcc: 9.4.0 ant: 1.10.7
Version 2.x (Deprecated) platform: ubuntu 16.04 wget xvfb curl ssh git: 2.7.4 mercurial: 3.7.3 java: Open-JDK 1.8u151 maven: 3.3.9 node: 8.9.4 npm: 5.6.0 nvm: 0.33.8 python: 2.7.12 gcc: 5.4.0 ant: 1.9.6
Version 1.x / Latest (Deprecated) platform: ubuntu 14.04 packages available out-of-the-box: wget xvfb curl git: 1.9.1 java: 1.8u66 maven: 3.0.5 node: 4.2.1 npm: 2.14.7 nvm: 0.29.0 python: 2.7.6 gcc: 4.8.4
More details about the contents: https://confluence.atlassian.com/bitbucket/using-docker-images-as-build-environments-792298897.html
The latest tag atlassian/default-image:latest is currently using version 1 in order to keep compatibility with existing Bitbucket Pipelines builds.
However, we strongly recommend that you select a specific version (4.x) in order to prevent breaking changes from impacting your setup. You can use a specific version by using a version number tag: atlassian/default-image:4. This will install the latest 4.x version that is available.
FROM ubuntu:22.04 as docker-compose-downloader
ARG TARGETARCH
COPY ./install-docker-compose.sh /install-docker-compose.sh
RUN ./install-docker-compose.sh
FROM ubuntu:22.04
LABEL maintainer="Bitbucket Pipelines <pipelines-feedback@atlassian.com>"
# Args
ARG BUILD_DATE
ARG REVISION
ARG BUILD_VERSION
ARG DEBIAN_FRONTEND=noninteractive
# Labels
LABEL \
org.opencontainers.image.authors="Bitbucket Pipelines <pipelines-feedback@atlassian.com>" \
org.opencontainers.image.created=$BUILD_DATE \
org.opencontainers.image.title="atlassian/default-image" \
org.opencontainers.image.description="Default image for Bitbucket Pipelines" \
org.opencontainers.image.url="https://bitbucket.org/" \
org.opencontainers.image.revision=$REVISION \
org.opencontainers.image.vendor="Atlassian" \
org.opencontainers.image.version=$BUILD_VERSION
# Install base dependencies
RUN apt-get update \
&& apt-get install -y \
software-properties-common \
&& add-apt-repository ppa:git-core/ppa -y \
&& apt-get install -y \
autoconf \
build-essential \
ca-certificates \
pkg-config \
wget \
xvfb \
curl \
git \
ant \
ssh-client \
unzip \
iputils-ping \
zip \
jq \
gettext-base \
tar \
parallel \
&& rm -rf /var/lib/apt/lists/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install docker-compose
COPY --from=docker-compose-downloader /usr/local/bin/docker-compose /usr/local/bin/docker-compose
# Test Docker Compose install
RUN docker-compose version
# Install nvm with node and npm
ENV NODE_VERSION=18.16.1 \
NVM_DIR=/root/.nvm \
NVM_VERSION=0.39.2 \
NVM_SHA256=c1e672cd63737cd3e166ad43dffcb630a3bea07484705eae303c4b6c3e42252a
RUN curl https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh -o install_nvm.sh \
&& echo "${NVM_SHA256} install_nvm.sh" | sha256sum -c - \
&& bash install_nvm.sh \
&& rm -rf install_nvm.sh \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
# Set node path
ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION/lib/node_modules
# Default to UTF-8 file.encoding
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
LANGUAGE=C.UTF-8
# Xvfb provide an in-memory X-session for tests that require a GUI
ENV DISPLAY=:99
# Set the path.
ENV PATH=$NVM_DIR:$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
# Create dirs and users
RUN mkdir -p /opt/atlassian/bitbucketci/agent/build \
&& sed -i '/[ -z \"PS1\" ] && return/a\\ncase $- in\n*i*) ;;\n*) return;;\nesac' /root/.bashrc \
&& useradd --create-home --shell /bin/bash --uid 1000 pipelines
WORKDIR /opt/atlassian/bitbucketci/agent/build
ENTRYPOINT ["/bin/bash"]
For product support go to support.atlassian.com.
docker pull atlassian/default-image