Skip to content

Commit

Permalink
update terraform-ls and terraform versions (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
iaroki authored Jun 3, 2023
1 parent 2797037 commit ce5a072
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions servers/terraformls/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM alpine:3.15.0 as build
FROM alpine:3.16.2 AS build

ARG TF_LS_VERSION=0.29.3
ARG TF_VERSION=1.3.3

RUN apk add --no-cache --virtual \
build-deps \
Expand All @@ -7,24 +10,25 @@ RUN apk add --no-cache --virtual \

WORKDIR /build

RUN curl --proto '=https' --tlsv1.2 -fsSLO https://releases.hashicorp.com/terraform-ls/0.25.2/terraform-ls_0.25.2_linux_amd64.zip \
--next -fsSLO https://releases.hashicorp.com/terraform-ls/0.25.2/terraform-ls_0.25.2_SHA256SUMS \
--next -fsSLO https://releases.hashicorp.com/terraform-ls/0.25.2/terraform-ls_0.25.2_SHA256SUMS.sig \
--next -fsSLO https://releases.hashicorp.com/terraform/1.1.3/terraform_1.1.3_linux_amd64.zip \
--next -fsSLO https://releases.hashicorp.com/terraform/1.1.3/terraform_1.1.3_SHA256SUMS \
--next -fsSLO https://releases.hashicorp.com/terraform/1.1.3/terraform_1.1.3_SHA256SUMS.sig \
RUN curl --proto '=https' \
--tlsv1.2 -fsSLO https://releases.hashicorp.com/terraform-ls/${TF_LS_VERSION}/terraform-ls_${TF_LS_VERSION}_linux_amd64.zip \
--next -fsSLO https://releases.hashicorp.com/terraform-ls/${TF_LS_VERSION}/terraform-ls_${TF_LS_VERSION}_SHA256SUMS \
--next -fsSLO https://releases.hashicorp.com/terraform-ls/${TF_LS_VERSION}/terraform-ls_${TF_LS_VERSION}_SHA256SUMS.sig \
--next -fsSLO https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip \
--next -fsSLO https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_SHA256SUMS \
--next -fsSLO https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_SHA256SUMS.sig \
--next -s -o hashicorp.asc https://keybase.io/hashicorp/pgp_keys.asc \
&& gpg --import ./hashicorp.asc \
&& grep terraform-ls_0.25.2_linux_amd64.zip terraform-ls_0.25.2_SHA256SUMS > SHA256SUMS \
&& grep terraform_1.1.3_linux_amd64.zip terraform_1.1.3_SHA256SUMS > TERRAFORM_SHA256SUMS \
&& gpg --verify terraform-ls_0.25.2_SHA256SUMS.sig terraform-ls_0.25.2_SHA256SUMS \
&& gpg --verify terraform_1.1.3_SHA256SUMS.sig terraform_1.1.3_SHA256SUMS \
&& grep terraform-ls_${TF_LS_VERSION}_linux_amd64.zip terraform-ls_${TF_LS_VERSION}_SHA256SUMS > SHA256SUMS \
&& grep terraform_${TF_VERSION}_linux_amd64.zip terraform_${TF_VERSION}_SHA256SUMS > TERRAFORM_SHA256SUMS \
&& gpg --verify terraform-ls_${TF_LS_VERSION}_SHA256SUMS.sig terraform-ls_${TF_LS_VERSION}_SHA256SUMS \
&& gpg --verify terraform_${TF_VERSION}_SHA256SUMS.sig terraform_${TF_VERSION}_SHA256SUMS \
&& sha256sum -c SHA256SUMS \
&& sha256sum -c TERRAFORM_SHA256SUMS \
&& unzip terraform-ls_0.25.2_linux_amd64.zip \
&& unzip terraform_1.1.3_linux_amd64.zip
&& unzip terraform-ls_${TF_LS_VERSION}_linux_amd64.zip \
&& unzip terraform_${TF_VERSION}_linux_amd64.zip

FROM alpine:3.15.0
FROM alpine:3.16.2

COPY --from=build /build/terraform-ls /usr/bin/terraform-ls
COPY --from=build /build/terraform /usr/bin/terraform
Expand Down

0 comments on commit ce5a072

Please sign in to comment.