
lumosdang/coderDockerfileFROM ghcr.io/coder/coder:v2.2.0 USER root RUN apk add curl unzip # Create directory for the Terraform CLI (and assets) RUN mkdir -p /opt/terraform # Terraform is already included in the official Coder image. # See [***] # If you need to install a different version of Terraform, you can do so here. # The below step is optional if you wish to keep the existing version. # See [***] # for supported Terraform versions. ARG TERRAFORM_VERSION=1.5.7 RUN apk update && \ apk del terraform && \ curl -LOs [***]{TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ && unzip -o terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ && mv terraform /opt/terraform \ && rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip ENV PATH=/opt/terraform:${PATH} # Additionally, a Terraform mirror needs to be configured # to download the Terraform providers used in Coder templates. # There are two options: # Option 1) Use a filesystem mirror. We can seed this at build-time # or by mounting a volume to /opt/terraform/plugins in the container. # [***] # Be sure to add all the providers you use in your templates to /opt/terraform/plugins RUN mkdir -p /opt/terraform/plugins ADD filesystem-mirror.tfrc /opt/terraform/config.tfrc # Optionally, we can "seed" the filesystem mirror with common providers. # Comment out lines 40-49 if you plan on only using a volume or network mirror: RUN mkdir -p /opt/terraform/plugins/registry.terraform.io WORKDIR /opt/terraform/plugins/registry.terraform.io ARG CODER_PROVIDER_VERSION=0.12.1 RUN echo "Adding coder/coder v${CODER_PROVIDER_VERSION}" \ && mkdir -p coder/coder && cd coder/coder \ && curl -LOs [***]{CODER_PROVIDER_VERSION}/terraform-provider-coder_${CODER_PROVIDER_VERSION}_linux_amd64.zip ARG DOCKER_PROVIDER_VERSION=3.0.2 RUN echo "Adding kreuzwerker/docker v${DOCKER_PROVIDER_VERSION}" \ && mkdir -p kreuzwerker/docker && cd kreuzwerker/docker \ && curl -LOs [***]{DOCKER_PROVIDER_VERSION}/terraform-provider-docker_${DOCKER_PROVIDER_VERSION}_linux_amd64.zip ARG KUBERNETES_PROVIDER_VERSION=2.23.0 RUN echo "Adding hashicorp/kubernetes v${KUBERNETES_PROVIDER_VERSION}" \ && mkdir -p hashicorp/kubernetes && cd hashicorp/kubernetes \ && curl -LOs [***]{KUBERNETES_PROVIDER_VERSION}/terraform-provider-kubernetes_${KUBERNETES_PROVIDER_VERSION}_linux_amd64.zip ARG AWS_PROVIDER_VERSION=5.19.0 RUN echo "Adding aws/aws v${AWS_PROVIDER_VERSION}" \ && mkdir -p aws/aws && cd aws/aws \ && curl -LOs [***]{AWS_PROVIDER_VERSION}/terraform-provider-aws_${AWS_PROVIDER_VERSION}_linux_amd64.zip RUN chown -R coder:coder /opt/terraform WORKDIR /home/coder # Option 2) Use a network mirror. # [***] # Be sure uncomment line 60 and edit network-mirror-example.tfrc to # specify the HTTPS base URL of your mirror. # ADD network-mirror.tfrc /opt/terraform/config.tfrc USER coder # Use the tfrc file to inform ENV TF_CLI_CONFIG_FILE=/opt/terraform/config.tfrc
# filesystem-mirror.tfrc provider_installation { filesystem_mirror { path = "/opt/terraform/plugins" } }
#network-mirror.tfrc provider_installation { network_mirror { url = "[***]" } }




manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务