Files
coder/scripts/Dockerfile.base
coder[bot]andDmitry Makovey 116660193e chore: bump bundled terraform to 1.16.6 (#30516)
Bump the bundled Terraform binary from 1.16.2 to 1.16.6 (latest stable,
[released
2026-10-14](https://github.com/hashicorp/terraform/releases/tag/v1.16.6)),
following the same file set as #29331:

- `provisioner/terraform/install.go`: `TerraformVersion`
(`maxTerraformVersion` stays at 1.16.9 since this is a patch bump)
- `install.sh`, `scripts/Dockerfile.base`
- `mise.toml`, `mise.lock` (checksums from HashiCorp's
`terraform_1.16.6_SHA256SUMS`)
- `flake.nix` (fetchurl SRI hashes derived from the same SHA256SUMS)
- `docs/install/prepare/airgap.md`: the example Dockerfile `ARG
TERRAFORM_VERSION` had drifted back to 1.11.0 after the docs move;
updated to 1.16.6

Verified locally with `go test ./provisioner/terraform/ -run
'TestInstall|Version'`.

Opened by Superblink on behalf of @droopy4096.

_Updated from 1.16.5 to 1.16.6 (adds an HTTP/2 resource-exhaustion fix).
Branch name still says 1.16.5. Fixture fingerprint (`generation.sha1`)
regenerated; `go test ./provisioner/terraform/ -run
'TestInstall|Version|Golden'` passes._

---------

Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
Co-authored-by: Dmitry Makovey <dmakovey@yahoo.com>
2026-10-15 12:33:45 -07:00

39 lines
1.5 KiB
Docker

# This is the base image used for Coder images. It's a multi-arch image that is
# built in depot.dev for all supported architectures. Since it's built on real
# hardware and not cross-compiled, it can have "RUN" commands.
FROM alpine:3.24.2@sha256:294b683cb724975bec92580e1e685676bd4b50bda910ddb8c51d4cabeaec77e6
# We use a single RUN command to reduce the number of layers in the image.
# NOTE: Keep the Terraform version in sync with minTerraformVersion and
# maxTerraformVersion in provisioner/terraform/install.go.
RUN apk add --no-cache \
curl \
wget \
bash \
git \
openssl \
openssh-client \
tzdata && \
addgroup \
-g 1000 \
coder && \
adduser \
-D \
-s /bin/bash \
-h /home/coder \
-u 1000 \
-G coder \
coder
# Terraform was disabled in the edge repo due to a build issue.
# https://gitlab.alpinelinux.org/alpine/aports/-/commit/f3e263d94cfac02d594bef83790c280e045eba35
# Using wget for now. Note that busybox unzip doesn't support streaming.
RUN ARCH="$(arch)"; if [ "${ARCH}" == "x86_64" ]; then ARCH="amd64"; elif [ "${ARCH}" == "aarch64" ]; then ARCH="arm64"; elif [ "${ARCH}" == "armv7l" ]; then ARCH="arm"; fi; wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.16.6/terraform_1.16.6_linux_${ARCH}.zip" && \
busybox unzip /tmp/terraform.zip -d /usr/local/bin && \
rm -f /tmp/terraform.zip && \
chmod +x /usr/local/bin/terraform && \
terraform --version
USER 1000:1000
ENV HOME=/home/coder
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt
WORKDIR /home/coder