github.com/eliastor/durgaform@v0.0.0-20220816172711-d0ab2d17673e/.github/workflows/build-Dockerfile (about)

     1  # This Dockerfile is not intended for general use, but is rather used to
     2  # produce our "light" release packages as part of our official release
     3  # pipeline.
     4  #
     5  # If you want to test this locally you'll need to set the three arguments
     6  # to values realistic for what the hashicorp/actions-docker-build GitHub
     7  # action would set, and ensure that there's a suitable "terraform" executable
     8  # in the dist/linux/${TARGETARCH} directory.
     9  
    10  FROM docker.mirror.hashicorp.services/alpine:latest AS default
    11  
    12  # This is intended to be run from the hashicorp/actions-docker-build GitHub
    13  # action, which sets these appropriately based on context.
    14  ARG PRODUCT_VERSION=UNSPECIFIED
    15  ARG PRODUCT_REVISION=UNSPECIFIED
    16  ARG BIN_NAME=terraform
    17  
    18  # This argument is set by the Docker toolchain itself, to the name
    19  # of the CPU architecture we're building an image for.
    20  # Our caller should've extracted the corresponding "terraform" executable
    21  # into dist/linux/${TARGETARCH} for us to use.
    22  ARG TARGETARCH
    23  
    24  LABEL maintainer="HashiCorp Terraform Team <terraform@hashicorp.com>"
    25  
    26  # New standard version label.
    27  LABEL version=$VERSION
    28  
    29  # Historical Terraform-specific label preserved for backward compatibility.
    30  LABEL "com.hashicorp.terraform.version"="${VERSION}"
    31  
    32  RUN apk add --no-cache git openssh
    33  
    34  # The hashicorp/actions-docker-build GitHub Action extracts the appropriate
    35  # release package for our target architecture into the current working
    36  # directory before running "docker build", which we'll then copy into the
    37  # Docker image to make sure that we use an identical binary as all of the
    38  # other official release channels.
    39  COPY ["dist/linux/${TARGETARCH}/terraform", "/bin/terraform"]
    40  
    41  ENTRYPOINT ["/bin/terraform"]