diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 24345658de..478670df2e 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -190,9 +190,9 @@ steps: setup: - "alpine" - "alpine-k8s" - - "ubuntu-18.04" - "ubuntu-20.04" - "ubuntu-22.04" + - "ubuntu-24.04" - "sidecar" - group: ":docker: Docker Image Tests" @@ -216,9 +216,9 @@ steps: variant: - alpine - alpine-k8s - - ubuntu-18.04 - ubuntu-20.04 - ubuntu-22.04 + - ubuntu-24.04 - sidecar - name: ":docker: {{matrix.variant}} arm64 image test" @@ -240,9 +240,9 @@ steps: variant: - alpine - alpine-k8s - - ubuntu-18.04 - ubuntu-20.04 - ubuntu-22.04 + - ubuntu-24.04 - sidecar - name: ":debian: Debian package build" diff --git a/.buildkite/steps/build-docker-image.sh b/.buildkite/steps/build-docker-image.sh index dcbf9b5280..1af8647d2b 100755 --- a/.buildkite/steps/build-docker-image.sh +++ b/.buildkite/steps/build-docker-image.sh @@ -4,7 +4,7 @@ set -Eeufo pipefail ## This script can be run locally like this: ## -## .buildkite/steps/build-docker-image.sh (alpine|alpine-k8s|ubuntu-18.04|ubuntu-20.04|ubuntu-22.04|sidecar) (image tag) (codename) (version) +## .buildkite/steps/build-docker-image.sh (alpine|alpine-k8s|ubuntu-20.04|ubuntu-22.04|ubuntu-24.04|sidecar) (image tag) (codename) (version) ## e.g: .buildkite/steps/build-docker-image.sh alpine buildkiteci/agent:lox-manual-build stable 3.1.1 ## ## You can then publish that image with @@ -21,7 +21,7 @@ codename="${3:-}" version="${4:-}" push="${PUSH_IMAGE:-true}" -if [[ ! "$variant" =~ ^(alpine|alpine-k8s|ubuntu-18\.04|ubuntu-20\.04|ubuntu-22\.04|sidecar)$ ]]; then +if [[ ! "$variant" =~ ^(alpine|alpine-k8s|ubuntu-20\.04|ubuntu-22\.04|ubuntu-24\.04|sidecar)$ ]]; then echo "Unknown docker variant $variant" exit 1 fi diff --git a/.buildkite/steps/extract-agent-version-metadata.sh b/.buildkite/steps/extract-agent-version-metadata.sh index 73428b217c..d511447fa5 100755 --- a/.buildkite/steps/extract-agent-version-metadata.sh +++ b/.buildkite/steps/extract-agent-version-metadata.sh @@ -9,9 +9,9 @@ full_agent_version="buildkite-agent version ${agent_version}, build ${build_vers registry="445615400570.dkr.ecr.us-east-1.amazonaws.com/agent" docker_alpine_image_tag="$registry:alpine-build-${BUILDKITE_BUILD_NUMBER}" docker_alpine_k8s_image_tag="$registry:alpine-k8s-build-${BUILDKITE_BUILD_NUMBER}" -docker_ubuntu_bionic_image_tag="$registry:ubuntu-18.04-build-${BUILDKITE_BUILD_NUMBER}" docker_ubuntu_focal_image_tag="$registry:ubuntu-20.04-build-${BUILDKITE_BUILD_NUMBER}" docker_ubuntu_jammy_image_tag="$registry:ubuntu-22.04-build-${BUILDKITE_BUILD_NUMBER}" +docker_ubuntu_noble_image_tag="$registry:ubuntu-24.04-build-${BUILDKITE_BUILD_NUMBER}" docker_sidecar_image_tag="$registry:sidecar-build-${BUILDKITE_BUILD_NUMBER}" @@ -24,9 +24,9 @@ echo "Full agent version: $full_agent_version" echo "Agent version: $agent_version" echo "Build version: $build_version" echo "Docker Alpine Image Tag: $docker_alpine_image_tag" -echo "Docker Ubuntu 18.04 Image Tag: $docker_ubuntu_bionic_image_tag" echo "Docker Ubuntu 20.04 Image Tag: $docker_ubuntu_focal_image_tag" echo "Docker Ubuntu 22.04 Image Tag: $docker_ubuntu_jammy_image_tag" +echo "Docker Ubuntu 24.04 Image Tag: $docker_ubuntu_noble_image_tag" echo "Docker Sidecar Image Tag: $docker_sidecar_image_tag" echo "Is prerelease? $is_prerelease" @@ -35,8 +35,8 @@ buildkite-agent meta-data set "agent-version-full" "$full_agent_version" buildkite-agent meta-data set "agent-version-build" "$build_version" buildkite-agent meta-data set "agent-docker-image-alpine" "$docker_alpine_image_tag" buildkite-agent meta-data set "agent-docker-image-alpine-k8s" "$docker_alpine_k8s_image_tag" -buildkite-agent meta-data set "agent-docker-image-ubuntu-18.04" "$docker_ubuntu_bionic_image_tag" buildkite-agent meta-data set "agent-docker-image-ubuntu-20.04" "$docker_ubuntu_focal_image_tag" buildkite-agent meta-data set "agent-docker-image-ubuntu-22.04" "$docker_ubuntu_jammy_image_tag" +buildkite-agent meta-data set "agent-docker-image-ubuntu-24.04" "$docker_ubuntu_noble_image_tag" buildkite-agent meta-data set "agent-docker-image-sidecar" "$docker_sidecar_image_tag" buildkite-agent meta-data set "agent-is-prerelease" "$is_prerelease" diff --git a/.buildkite/steps/publish-docker-images.sh b/.buildkite/steps/publish-docker-images.sh index adfa812835..d3ed489dbc 100755 --- a/.buildkite/steps/publish-docker-images.sh +++ b/.buildkite/steps/publish-docker-images.sh @@ -62,7 +62,7 @@ esac version="$(buildkite-agent meta-data get "agent-version")" build="$(buildkite-agent meta-data get "agent-version-build")" -for variant in "alpine" "alpine-k8s" "ubuntu-18.04" "ubuntu-20.04" "ubuntu-22.04" "sidecar" ; do +for variant in "alpine" "alpine-k8s" "ubuntu-20.04" "ubuntu-22.04" "ubuntu-24.04" "sidecar" ; do echo "--- Getting docker image tag for $variant from build meta data" source_image="$(buildkite-agent meta-data get "agent-docker-image-${variant}")" echo "Docker Image Tag for ${variant}: ${source_image}" diff --git a/.buildkite/steps/upload-release-steps.sh b/.buildkite/steps/upload-release-steps.sh index 629bfab030..a23679558e 100755 --- a/.buildkite/steps/upload-release-steps.sh +++ b/.buildkite/steps/upload-release-steps.sh @@ -29,9 +29,9 @@ trigger_step() { agent-version-full: "${full_agent_version}" agent-docker-image-alpine: "${agent_docker_image_alpine}" 'agent-docker-image-alpine-k8s': "${agent_docker_image_alpine_k8s}" - 'agent-docker-image-ubuntu-18.04': "${agent_docker_image_ubuntu_bionic}" 'agent-docker-image-ubuntu-20.04': "${agent_docker_image_ubuntu_focal}" 'agent-docker-image-ubuntu-22.04': "${agent_docker_image_ubuntu_jammy}" + 'agent-docker-image-ubuntu-24.04': "${agent_docker_image_ubuntu_noble}" agent-docker-image-sidecar: "${agent_docker_image_sidecar}" agent-is-prerelease: "${agent_is_prerelease}" env: @@ -76,9 +76,10 @@ build_version=$(buildkite-agent meta-data get "agent-version-build") full_agent_version=$(buildkite-agent meta-data get "agent-version-full") agent_docker_image_alpine=$(buildkite-agent meta-data get "agent-docker-image-alpine") agent_docker_image_alpine_k8s=$(buildkite-agent meta-data get "agent-docker-image-alpine-k8s") -agent_docker_image_ubuntu_bionic=$(buildkite-agent meta-data get "agent-docker-image-ubuntu-18.04") agent_docker_image_ubuntu_focal=$(buildkite-agent meta-data get "agent-docker-image-ubuntu-20.04") agent_docker_image_ubuntu_jammy=$(buildkite-agent meta-data get "agent-docker-image-ubuntu-22.04") +agent_docker_image_ubuntu_noble=$(buildkite-agent meta-data get "agent-docker-image-ubuntu-24.04") + agent_docker_image_sidecar=$(buildkite-agent meta-data get "agent-docker-image-sidecar") agent_is_prerelease=$(buildkite-agent meta-data get "agent-is-prerelease") diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 1a6b746c5f..227662ee2a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,9 +5,9 @@ updates: - /packaging/docker/alpine - /packaging/docker/alpine-k8s - /packaging/docker/sidecar - - /packaging/docker/ubuntu-18.04 - /packaging/docker/ubuntu-20.04 - /packaging/docker/ubuntu-22.04 + - /packaging/docker/ubuntu-24.04 schedule: interval: weekly ignore: diff --git a/README.md b/README.md index c2f99d64eb..1a36a094b1 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ For example, agent version 3.45.6 is published as: #### Supported operating systems - Alpine 3.18 -- Ubuntu 18.04 LTS (x86_64), supported to end of standard support for 18.04 - Ubuntu 20.04 LTS (x86_64), supported to end of standard support for 20.04 - Ubuntu 22.04 LTS (x86_64), supported to end of standard support for 22.04 +- Ubuntu 24.04 LTS (x86_64), supported to end of standard support for 24.04 ## Starting @@ -172,7 +172,7 @@ release). The agent binary is fairly portable and should run out of the box on most UNIX like systems, as well as Windows. -- Ubuntu 18.04 and newer +- Ubuntu 20.04 and newer - Debian 8 and newer - Red Hat RHEL 7 and newer - CentOS diff --git a/packaging/docker/ubuntu-18.04/Dockerfile b/packaging/docker/ubuntu-18.04/Dockerfile deleted file mode 100644 index f5be4ea72c..0000000000 --- a/packaging/docker/ubuntu-18.04/Dockerfile +++ /dev/null @@ -1,48 +0,0 @@ -FROM public.ecr.aws/ubuntu/ubuntu:18.04@sha256:975b418c2c6c72bdfb978ac631c3fae2f42b752f5ab29dec706a01f3f6acc14b - -ARG TARGETOS -ARG TARGETARCH - -ENV DEBIAN_FRONTEND=noninteractive -ENV DOCKER_COMPOSE_VERSION=1.27.4 -ENV TINI_VERSION=0.19.0 - -RUN apt-get update && apt-get install -y --no-install-recommends \ - apt-transport-https \ - curl \ - ca-certificates \ - bash \ - git \ - gnupg-agent \ - jq \ - openssh-client \ - perl \ - python3 \ - python3-pip \ - rsync \ - software-properties-common \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository \ - "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ - && apt-get update \ - && apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin docker-buildx-plugin \ - && rm -rf /var/lib/apt/lists/* \ - && pip3 install --upgrade pip setuptools \ - && pip3 install docker-compose==$DOCKER_COMPOSE_VERSION - -RUN curl -Lfs -o /sbin/tini https://github.com/krallin/tini/releases/download/v${TINI_VERSION}/tini-${TARGETARCH} && chmod +x /sbin/tini - -ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \ - PATH="/usr/local/bin:${PATH}" - -RUN mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins \ - && curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh \ - && chmod +x /usr/local/bin/ssh-env-config.sh - -COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg -COPY ./buildkite-agent-$TARGETOS-$TARGETARCH /usr/local/bin/buildkite-agent -COPY ./entrypoint.sh /usr/local/bin/buildkite-agent-entrypoint - -VOLUME /buildkite -ENTRYPOINT ["buildkite-agent-entrypoint"] -CMD ["start"] diff --git a/packaging/docker/ubuntu-20.04/Dockerfile b/packaging/docker/ubuntu-20.04/Dockerfile index 9a9bf66c0e..8e34a89724 100644 --- a/packaging/docker/ubuntu-20.04/Dockerfile +++ b/packaging/docker/ubuntu-20.04/Dockerfile @@ -5,41 +5,59 @@ FROM public.ecr.aws/ubuntu/ubuntu:20.04@sha256:4a885c102bc7de9ff2ffc4b11b65f35e4 ARG TARGETOS ARG TARGETARCH -ENV DEBIAN_FRONTEND=noninteractive -ENV DOCKER_COMPOSE_VERSION=1.27.4 - -RUN apt-get update && apt-get install -y --no-install-recommends \ - apt-transport-https \ - bash \ - ca-certificates \ - curl \ - git \ - gnupg-agent \ - jq \ - openssh-client \ - perl \ - python \ - python3-pip \ - rsync \ - software-properties-common \ - tini \ - && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \ - && add-apt-repository \ - "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ - && apt-get update \ - && apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin docker-buildx-plugin \ - && rm -rf /var/lib/apt/lists/* \ - && pip3 install docker-compose==$DOCKER_COMPOSE_VERSION +RUN < /dev/null -RUN ln -s /usr/bin/tini /usr/sbin/tini +# We just updated the main sources. This only updates the docker source +apt-get update -o Dir::Etc::sourcelist="sources.list.d/docker.list" \ + -o Dir::Etc::sourceparts="-" \ + -o APT::Get::List-Cleanup="0" +apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -RUN mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins \ - && curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh \ - && chmod +x /usr/local/bin/ssh-env-config.sh +rm -rf /var/lib/apt/lists/* + +ln -s /usr/bin/tini /usr/sbin/tini + +mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins +curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh +chmod +x /usr/local/bin/ssh-env-config.sh +BASH + +ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \ + PATH="/usr/local/bin:${PATH}" +COPY ./docker-compose /usr/local/bin/docker-compose COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg COPY ./buildkite-agent-$TARGETOS-$TARGETARCH /usr/local/bin/buildkite-agent COPY ./entrypoint.sh /usr/local/bin/buildkite-agent-entrypoint diff --git a/packaging/docker/ubuntu-22.04/Dockerfile b/packaging/docker/ubuntu-22.04/Dockerfile index 1e3e08bb96..105d18c2e7 100644 --- a/packaging/docker/ubuntu-22.04/Dockerfile +++ b/packaging/docker/ubuntu-22.04/Dockerfile @@ -12,6 +12,7 @@ set -eufo pipefail export DEBIAN_FRONTEND=noninteractive +# Install main packages apt-get update apt-get install -y --no-install-recommends \ apt-transport-https \ @@ -29,10 +30,21 @@ apt-get install -y --no-install-recommends \ software-properties-common \ tini -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - -add-apt-repository "deb [arch=$TARGETARCH] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" -apt-get update -apt-get install -y --no-install-recommends docker-ce-cli docker-compose-plugin docker-buildx-plugin +# Install Docker Engine +install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc +chmod a+r /etc/apt/keyrings/docker.asc +echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null + +# We just updated the main sources. This only updates the docker source +apt-get update -o Dir::Etc::sourcelist="sources.list.d/docker.list" \ + -o Dir::Etc::sourceparts="-" \ + -o APT::Get::List-Cleanup="0" +apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + rm -rf /var/lib/apt/lists/* ln -s /usr/bin/tini /usr/sbin/tini @@ -43,7 +55,7 @@ chmod +x /usr/local/bin/ssh-env-config.sh BASH ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \ - PATH="/usr/local/bin:${PATH}" + PATH="/usr/local/bin:${PATH}" COPY ./docker-compose /usr/local/bin/docker-compose COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg diff --git a/packaging/docker/ubuntu-24.04/Dockerfile b/packaging/docker/ubuntu-24.04/Dockerfile new file mode 100644 index 0000000000..375eb24663 --- /dev/null +++ b/packaging/docker/ubuntu-24.04/Dockerfile @@ -0,0 +1,67 @@ +# syntax=docker/dockerfile:1.4 + +FROM public.ecr.aws/ubuntu/ubuntu:24.04@sha256:fb95efe0d22be277f10250f15e5172ec0fe22c37eca2ba55e78b526c447eec23 + +ARG TARGETOS +ARG TARGETARCH + +RUN < /dev/null + +# We just updated the main sources. This only updates the docker source +apt-get update -o Dir::Etc::sourcelist="sources.list.d/docker.list" \ + -o Dir::Etc::sourceparts="-" \ + -o APT::Get::List-Cleanup="0" +apt-get install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin + +rm -rf /var/lib/apt/lists/* + +ln -s /usr/bin/tini /usr/sbin/tini + +mkdir -p /buildkite/builds /buildkite/hooks /buildkite/plugins +curl -Lfs -o /usr/local/bin/ssh-env-config.sh https://raw.githubusercontent.com/buildkite/docker-ssh-env-config/master/ssh-env-config.sh +chmod +x /usr/local/bin/ssh-env-config.sh +BASH + +ENV BUILDKITE_AGENT_CONFIG=/buildkite/buildkite-agent.cfg \ + PATH="/usr/local/bin:${PATH}" + +COPY ./docker-compose /usr/local/bin/docker-compose +COPY ./buildkite-agent.cfg /buildkite/buildkite-agent.cfg +COPY ./buildkite-agent-$TARGETOS-$TARGETARCH /usr/local/bin/buildkite-agent +COPY ./entrypoint.sh /usr/local/bin/buildkite-agent-entrypoint + +VOLUME /buildkite +ENTRYPOINT ["buildkite-agent-entrypoint"] +CMD ["start"] diff --git a/packaging/docker/ubuntu-18.04/buildkite-agent.cfg b/packaging/docker/ubuntu-24.04/buildkite-agent.cfg similarity index 100% rename from packaging/docker/ubuntu-18.04/buildkite-agent.cfg rename to packaging/docker/ubuntu-24.04/buildkite-agent.cfg diff --git a/packaging/docker/ubuntu-18.04/entrypoint.sh b/packaging/docker/ubuntu-24.04/entrypoint.sh similarity index 68% rename from packaging/docker/ubuntu-18.04/entrypoint.sh rename to packaging/docker/ubuntu-24.04/entrypoint.sh index afbd70f28c..cb736e209f 100755 --- a/packaging/docker/ubuntu-18.04/entrypoint.sh +++ b/packaging/docker/ubuntu-24.04/entrypoint.sh @@ -8,4 +8,4 @@ if [[ -d "$DIR" ]] ; then /bin/run-parts --exit-on-error "$DIR" fi -exec /sbin/tini -- ssh-env-config.sh /usr/local/bin/buildkite-agent "$@" +exec /usr/bin/tini -- ssh-env-config.sh /usr/local/bin/buildkite-agent "$@"