-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
ARG TERRAFORM_VERSION=0.13.4 | ||
ARG AZURECLI_VERSION=2.14.2 | ||
ARG TERRAFORM_VERSION=0.13.6 | ||
ARG AZURECLI_VERSION=2.19.1 | ||
|
||
FROM hashicorp/terraform:$TERRAFORM_VERSION as terraform | ||
FROM mcr.microsoft.com/azure-cli:$AZURECLI_VERSION | ||
ARG KUBECTL_VERSION=1.18.8 | ||
|
||
RUN curl -sLO https://storage.googleapis.com/kubernetes-release/release/v{$KUBECTL_VERSION}/bin/linux/amd64/kubectl \ | ||
&& chmod 755 ./kubectl \ | ||
&& mv ./kubectl /usr/local/bin/kubectl | ||
COPY --from=terraform /bin/terraform /bin/terraform | ||
|
||
WORKDIR /viya4-iac-azure | ||
|
||
COPY --from=terraform /bin/terraform /bin/terraform | ||
COPY . . | ||
|
||
RUN apk --update --no-cache add git openssh \ | ||
&& curl -sLO https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl \ | ||
&& chmod 755 ./kubectl /viya4-iac-azure/docker-entrypoint.sh \ | ||
&& mv ./kubectl /usr/local/bin/kubectl \ | ||
&& chmod g=u -R /etc/passwd /etc/group /viya4-iac-azure \ | ||
&& terraform init /viya4-iac-azure | ||
|
||
ENV TF_VAR_iac_tooling=docker | ||
ENTRYPOINT ["/bin/terraform"] | ||
ENTRYPOINT ["/viya4-iac-azure/docker-entrypoint.sh"] | ||
VOLUME ["/workspace"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# setup container user | ||
echo "viya4-iac-azure:*:$(id -u):$(id -g):,,,:/viya4-iac-azure:/bin/bash" >> /etc/passwd | ||
echo "viya4-iac-azure:*:$(id -G | cut -d' ' -f 2)" >> /etc/group | ||
|
||
exec /bin/terraform $@ |