-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[nc] change base ubuntu convention and add 2204 and 2404 versions
Signed-off-by: Nic Cheneweth <[email protected]>
- Loading branch information
1 parent
3d0d84a
commit f4dd945
Showing
6 changed files
with
243 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
FROM ubuntu:22.04 | ||
|
||
LABEL org.opencontainers.image.title="gha-container-base-image" \ | ||
org.opencontainers.image.description="Ubuntu-based github actions job container image" \ | ||
org.opencontainers.image.documentation="https://github.com/ThoughtWorks-DPS/gha-container-base-image" \ | ||
org.opencontainers.image.source="https://github.com/ThoughtWorks-DPS/gha-container-base-image" \ | ||
org.opencontainers.image.url="https://github.com/ThoughtWorks-DPS/gha-container-base-image" \ | ||
org.opencontainers.image.vendor="ThoughtWorks, Inc." \ | ||
org.opencontainers.image.authors="[email protected]" \ | ||
org.opencontainers.image.licenses="MIT" \ | ||
org.opencontainers.image.created="CREATED" \ | ||
org.opencontainers.image.version="VERSION" | ||
|
||
ENV DOCKER_VERSION=5:27.3.1-1~ubuntu.22.04~jammy | ||
ENV DOCKER_BUILDX_VERSION=0.17.1-1~ubuntu.22.04~jammy | ||
ENV DOCKER_COMPOSE_VERSION=2.29.7-1~ubuntu.22.04~jammy | ||
ENV CONTAINERD_VERSION=1.7.22-1 | ||
ENV ONEPASSWORD_VERSION=2.30.0 | ||
ENV VAULT_VERSION=1.18.0 | ||
ENV TELLER_VERSION=1.5.6 | ||
ENV BUILDEVENTS_VERSION=0.16.0 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
ENV PATH=/home/circleci/bin:/home/circleci/.local/bin:$PATH \ | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US:en \ | ||
LC_ALL=en_US.UTF-8 | ||
|
||
SHELL ["/bin/bash", "-exo", "pipefail", "-c"] | ||
|
||
# hadolint ignore=DL4001,DL3004,DL3047,DL3027,DL3008,SC1091 | ||
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90forceyes && \ | ||
echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90forceyes && apt update && \ | ||
apt-get install --no-install-recommends -y \ | ||
ca-certificates=20240203~22.04.1 \ | ||
locales=2.35-0ubuntu3.8 \ | ||
build-essential=12.9ubuntu3 \ | ||
software-properties-common=0.99.22.9 \ | ||
apt-transport-https=2.4.13 \ | ||
tzdata=2024a-0ubuntu0.22.04.1 \ | ||
lsb-release=11.1.0ubuntu4 \ | ||
gettext-base=0.21-4ubuntu4 \ | ||
gcc=4:11.2.0-1ubuntu1 \ | ||
g++=4:11.2.0-1ubuntu1 \ | ||
cmake=3.22.1-1ubuntu1.22.04.2 \ | ||
make=4.3-4.1build1 \ | ||
git=1:2.34.1-1ubuntu1.11 \ | ||
git-lfs=3.0.2-1ubuntu0.2 \ | ||
curl=7.81.0-1ubuntu1.18 \ | ||
libcurl4-openssl-dev=7.81.0-1ubuntu1.18 \ | ||
tar=1.34+dfsg-1ubuntu0.1.22.04.2 \ | ||
wget=1.21.2-2ubuntu1.1 \ | ||
unzip=6.0-26ubuntu3.2 \ | ||
gzip=1.10-4ubuntu4.1 \ | ||
zip=3.0-12build2 \ | ||
bzip2=1.0.8-5build1 \ | ||
jq=1.6-2.1ubuntu3 \ | ||
gnupg=2.2.27-3ubuntu2.1 \ | ||
gnupg-agent=2.2.27-3ubuntu2.1 && \ | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null && \ | ||
mkdir -p -m 755 /etc/apt/keyrings && \ | ||
wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null && \ | ||
chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg && \ | ||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \ | ||
apt-get update && \ | ||
apt-get install --no-install-recommends -y \ | ||
gh=2.59.0 \ | ||
docker-ce=${DOCKER_VERSION} \ | ||
docker-ce-cli=${DOCKER_VERSION} \ | ||
containerd.io=${CONTAINERD_VERSION} \ | ||
docker-buildx-plugin=${DOCKER_BUILDX_VERSION} \ | ||
docker-compose-plugin=${DOCKER_COMPOSE_VERSION} && \ | ||
curl -L https://cache.agilebits.com/dist/1P/op2/pkg/v${ONEPASSWORD_VERSION}/op_linux_amd64_v${ONEPASSWORD_VERSION}.zip -o op.zip && \ | ||
unzip -o op.zip && mv op /usr/local/bin/op && \ | ||
rm op.zip && rm op.sig && \ | ||
curl -SLO "https://releases.hashicorp.com/vault/${VAULT_VERSION}/vault_${VAULT_VERSION}_linux_amd64.zip" > "vault_${VAULT_VERSION}_linux_amd64.zip" && \ | ||
unzip "vault_${VAULT_VERSION}_linux_amd64.zip" -d /usr/local/bin && \ | ||
rm "vault_${VAULT_VERSION}_linux_amd64.zip" && \ | ||
curl -L https://github.com/tellerops/teller/releases/download/v${TELLER_VERSION}/teller_${TELLER_VERSION}_Linux_x86_64.tar.gz --output teller_${TELLER_VERSION}_Linux_x86_64.tar.gz && \ | ||
tar -xzf teller_${TELLER_VERSION}_Linux_x86_64.tar.gz && \ | ||
mv teller /usr/local/bin/teller && \ | ||
rm teller_${TELLER_VERSION}_Linux_x86_64.tar.gz && \ | ||
curl -L -o buildevents https://github.com/honeycombio/buildevents/releases/download/v${BUILDEVENTS_VERSION}/buildevents-linux-amd64 && \ | ||
chmod +x buildevents && \ | ||
mv buildevents /usr/local/bin/buildevents && \ | ||
sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen && \ | ||
mkdir /root/.gnupg && \ | ||
bash -c "echo 'allow-loopback-pinentry' > /root/.gnupg/gpg-agent.conf" && \ | ||
bash -c "echo 'pinentry-mode loopback' > /root/.gnupg/gpg.conf" && \ | ||
chmod 700 /root/.gnupg && chmod 600 /root/.gnupg/* && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#!/usr/bin/env bats | ||
|
||
@test "gcc version" { | ||
run bash -c "docker exec gha-container-base-image gcc --version" | ||
[[ "${output}" =~ "11.4" ]] | ||
} | ||
|
||
@test "make version" { | ||
run bash -c "docker exec gha-container-base-image make --version" | ||
[[ "${output}" =~ "4.3" ]] | ||
} | ||
|
||
@test "curl version" { | ||
run bash -c "docker exec gha-container-base-image curl --version" | ||
[[ "${output}" =~ "7.81" ]] | ||
} | ||
|
||
@test "wget version" { | ||
run bash -c "docker exec gha-container-base-image wget --version" | ||
[[ "${output}" =~ "1.21" ]] | ||
} | ||
|
||
@test "unzip version" { | ||
run bash -c "docker exec gha-container-base-image unzip -v" | ||
[[ "${output}" =~ "6.0" ]] | ||
} | ||
|
||
@test "zip version" { | ||
run bash -c "docker exec gha-container-base-image zip --version" | ||
[[ "${output}" =~ "3.0" ]] | ||
} | ||
|
||
@test "jq version" { | ||
run bash -c "docker exec gha-container-base-image jq --version" | ||
[[ "${output}" =~ "1.6" ]] | ||
} | ||
|
||
@test "gnupg version" { | ||
run bash -c "docker exec gha-container-base-image gpg --version" | ||
[[ "${output}" =~ "2.2" ]] | ||
} | ||
|
||
@test "bash version" { | ||
run bash -c "docker exec gha-container-base-image bash --version" | ||
[[ "${output}" =~ "5.1" ]] | ||
} | ||
|
||
@test "check locale" { | ||
run bash -c "docker exec gha-container-base-image locale" | ||
[[ "${output}" =~ "LC_ALL=en_US.UTF-8" ]] | ||
} | ||
|
||
@test "1password version" { | ||
run bash -c "docker exec gha-container-base-image op --version" | ||
[[ "${output}" =~ "2.30" ]] | ||
} | ||
|
||
@test "teller version" { | ||
run bash -c "docker exec gha-container-base-image teller version" | ||
[[ "${output}" =~ "1.5.6" ]] | ||
} | ||
|
||
@test "vault version" { | ||
run bash -c "docker exec gha-container-base-image vault -v" | ||
[[ "${output}" =~ "1.18" ]] | ||
} | ||
|
||
@test "gh version" { | ||
run bash -c "docker exec gha-container-base-image gh --version" | ||
[[ "${output}" =~ "2.59" ]] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters