|
| 1 | +FROM ubuntu:24.04@sha256:b59d21599a2b151e23eea5f6602f4af4d7d31c4e236d22bf0b62b86d2e386b8f |
| 2 | + |
| 3 | +ARG BATS_VERSION=1.11.0 |
| 4 | + |
| 5 | +ARG DEBIAN_FRONTEND=noninteractive |
| 6 | + |
| 7 | +HEALTHCHECK NONE |
| 8 | + |
| 9 | +SHELL ["/bin/bash", "-o", "pipefail", "-c"] |
| 10 | + |
| 11 | +# Install the base system with all tool dependencies |
| 12 | +# hadolint ignore=DL3008 |
| 13 | +RUN --mount=type=bind,source=.devcontainer/gherkin/apt-requirements-base.json,target=/tmp/apt-requirements-base.json \ |
| 14 | + --mount=type=cache,target=/var/cache/apt,sharing=locked \ |
| 15 | + --mount=type=cache,target=/var/lib/apt,sharing=locked \ |
| 16 | + --mount=type=cache,target=/var/log,sharing=locked \ |
| 17 | + apt-get update && apt-get install -y --no-install-recommends jq \ |
| 18 | + && jq -r 'to_entries | .[] | .key + "=" + .value' /tmp/apt-requirements-base.json | \ |
| 19 | + xargs apt-get install -y --no-install-recommends \ |
| 20 | + && cp /etc/skel/.bashrc /root/.bashrc |
| 21 | + |
| 22 | +# Include the Cisco Umbrella PKI Root |
| 23 | +RUN wget -qO /usr/local/share/ca-certificates/Cisco_Umbrella_Root_CA.crt https://www.cisco.com/security/pki/certs/ciscoumbrellaroot.pem \ |
| 24 | + && update-ca-certificates |
| 25 | + |
| 26 | +# Install bats |
| 27 | +RUN batstmp="$(mktemp -d /tmp/bats-core-${BATS_VERSION}.XXXX)" \ |
| 28 | + && wget -qO - "https://github.com/bats-core/bats-core/archive/refs/tags/v${BATS_VERSION}.tar.gz" | tar xz -C "${batstmp}" \ |
| 29 | + && bash "${batstmp}/bats-core-${BATS_VERSION}/install.sh" /usr/local \ |
| 30 | + && rm -rf "${batstmp}" \ |
| 31 | + && git -C /usr/local clone -b v0.3.0 https://github.com/bats-core/bats-support.git \ |
| 32 | + && git -C /usr/local clone -b v2.1.0 https://github.com/bats-core/bats-assert.git |
0 commit comments