mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
fix(scripts): modify logic for determining terraform arch (#9595)
Commit fb3616c
used a build-arg to set the desired terrafomr
architeture to fetch. This is set in build_docker.sh but not
when building using depot.dev. Baking the logic into the
Dockerfile instead.
This commit is contained in:
@ -25,13 +25,11 @@ RUN apk add --no-cache \
|
||||
# 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.
|
||||
ARG ARCH
|
||||
RUN wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.5.6/terraform_1.5.6_linux_${ARCH}.zip" && \
|
||||
RUN ARCH="$(arch)"; if [ "${ARCH}" == "x86_64" ]; then ARCH="amd64"; fi; wget -O /tmp/terraform.zip "https://releases.hashicorp.com/terraform/1.5.6/terraform_1.5.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
|
||||
|
Reference in New Issue
Block a user