Skip to content

Commit a6b5097

Browse files
author
Jordan Jennings
committed
Fix Dockerfile compatibility with Alpine Linux
In order to support Alpine Linux the CGO_ENABLED=0 flag is needed, which is set in .goreleaser.yml but was not set in the Dockerfile. Before this change the binary built via the Dockerfile was not compatible with hashicorp/terraform base image, which is based on Alpine Linux.
1 parent fba816f commit a6b5097

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ WORKDIR /go/src/github.com/databrickslabs/databricks-terraform/
33
RUN curl -sSL "https://github.com/gotestyourself/gotestsum/releases/download/v0.4.2/gotestsum_0.4.2_linux_amd64.tar.gz" | tar -xz -C /usr/local/bin gotestsum
44
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.25.0
55
COPY . .
6-
RUN make vendor build
6+
RUN CGO_ENABLED=0 make vendor build
77

88
FROM hashicorp/terraform:latest
99
COPY --from=0 /go/src/github.com/databrickslabs/databricks-terraform/terraform-provider-databricks /root/.terraform.d/plugins/

0 commit comments

Comments
 (0)