This repository was archived by the owner on Mar 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM golang:1.19 -bullseye
1+ FROM golang:1.20 -bullseye
22
3+ RUN mkdir -p $GOPATH/src/github.com/fly-apps/terraform-provider-fly
34WORKDIR $GOPATH/src/github.com/fly-apps/terraform-provider-fly
4- COPY go.mod .
5- RUN go mod download -x
6- RUN mkdir -p /out/
75
8- COPY . .
9- RUN go env; go install; cp $GOPATH/bin/terraform-provider-fly /out/
10-
11- WORKDIR $GOPATH
6+ CMD go mod tidy; go build
Original file line number Diff line number Diff line change @@ -38,9 +38,10 @@ To run acceptance tests for this provider some scaffolding is required.
38386 . (Optional) set FLY_TF_TEST_REGION in ` .make-overrides ` to a region closer to you
3939
4040### Building with Docker
41- If you don't have a local Go environment, you can build in a container:
41+ If you do not have a local Go environment, you can build in a container. The binary will be placed in the root of the repository.
4242
43- ```
44- docker build --pull -t provider-fly:latest .
45- docker run --rm --entrypoint=cat provider-fly:latest /out/terraform-provider-fly > terraform-provider-fly
46- ```
43+ If you are not building for linux, set ` GOOS ` and ` GOARCH ` environment variables appropriately.
44+
45+ * ` docker-compose up ` (default, linux build)
46+ * ` GOOS=darwin GOARCH=arm64 docker-compose up ` (m1 mac)
47+ * ` docker-compose up --build ` if the version of golang has changed since the last run.
Original file line number Diff line number Diff line change 1+ services :
2+ build :
3+ build :
4+ context : .
5+ environment :
6+ - GOOS
7+ - GOARCH
8+ image : provider-fly
9+ volumes :
10+ - .:/go/src/github.com/fly-apps/terraform-provider-fly
You can’t perform that action at this time.
0 commit comments