Hi all,
I have question regarding the terraform docker container, I’m trying to perform an installation on this container for my runners and got an error.
"gitlab-terraform command not found" on the default template pipeline.
Now I’m trying to build the container using the following command:
docker build -t gitlab-terraform /opt/terraform-images/ --build-arg BASE_IMAGE=alpine:3.15.0 --build-arg TARGETARCH=amd64 --build-arg TERRAFORM_BINARY_VERSION=1.1.6
The thing is I never got the gitlab-terrafom /usr/bin/gitlab-terraform file
Docker Build Result,
Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
STEP 1/10: FROM alpine:3.15.0
STEP 2/10: ARG TARGETARCH
→ Using cache e13f7ae00880c6589cba8dfa978abcbdd2db076ac437bd01b03a495a5e609aee
→ e13f7ae0088
STEP 3/10: ARG TERRAFORM_BINARY_VERSION
→ Using cache 5c3f74d9173d59882dca0733fa9b9e21b4ead552e6a429371001cf3de0a315a0
→ 5c3f74d9173
STEP 4/10: RUN apk add --no-cache jq curl git openssh
→ Using cache 2eeee5d89efdec9156b0cbf8321c1d3f6f6d76f88036add112ee53a3e688f9a7
→ 2eeee5d89ef
STEP 5/10: WORKDIR /tmp
→ Using cache 75c67129d90e715c0ed3054806f4169921b5b6a8ea89e98af73906e4706263b3
→ 75c67129d90
STEP 6/10: RUN ( curl -sLo terraform.zip “https://releases.hashicorp.com/terraform/${TERRAFORM_BINARY_VERSION}/terraform_${TERRAFORM_BINARY_VERSION}linux${TARGETARCH}.zip” && unzip terraform.zip && rm terraform.zip && mv ./terraform /usr/local/bin/terraform ) && terraform --version
→ Using cache 8060e104b65cac2d154aa32fefcd4f7f4dd25a53ffbbd1a72b088f0dbcaca74b
→ 8060e104b65
STEP 7/10: WORKDIR /
→ Using cache acc2b3fb13cf5e410331bb4b317ae7d0976d227886c375b788ad4dfe1a49aecc
→ acc2b3fb13c
STEP 8/10: COPY src/bin/gitlab-terraform.sh /usr/bin/gitlab-terraform
→ Using cache d8f7af0e98f14cc0ec25a1e0ea35f6f8eae8846eee4c3eb8e9388e8aeb301ac7
→ d8f7af0e98f
STEP 9/10: RUN chmod +x /usr/bin/gitlab-terraform
→ Using cache 0387756d74624bf4c2f351b3c351b0f15a85805264cfe327142494051eff54d4
→ 0387756d746
STEP 10/10: ENTRYPOINT []
→ Using cache 9849070c736400ff0ff860ac8275ae6066c1d4139c66d19b9d28c3423f3d444e
COMMIT gitlab-terraform
→ 9849070c736
Successfully tagged localhost/gitlab-terraform:latest
9849070c736400ff0ff860ac8275ae6066c1d4139c66d19b9d28c3423f3d444e
I don’t know if anyone has saw this issue before.
Thank you.