Skip to content

Commit

Permalink
Merge pull request #8 from newrelic/cn/multi-platform-build
Browse files Browse the repository at this point in the history
Add multi-platform build/push
  • Loading branch information
caiges authored Apr 28, 2023
2 parents 755dc07 + 9fdc1e2 commit 4cd1ff6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
image_name=newrelic/fastly-to-insights

require_tag:
@if [ -z "$(tag)" ]; then echo "tag must be set" && exit 1; fi
@if [ "$(tag)" != "$(shell git describe --tags --exact-match)" ]; then echo "please checkout requested tag: $(tag)" && exit 1; fi

release: require_tag
docker buildx build --platform linux/amd64,linux/arm64 --push -t $(image_name):$(tag) .

build:
docker build -t $(image_name) .
docker buildx build --platform linux/amd64,linux/arm64 -t $(image_name) .

run: build
docker run --rm --env-file .env --name fastly-to-insights $(image_name)
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ You are welcome to send pull requests to us - however, by doing so you agree tha

A Makefile is provided which you can use to build and run the fastly to insights integration locally -- `make run` will build and then run the image. You can provide configuration via a `.env` file (`.env.example` provided as an example).

## Releasing

To release a new image, make sure you've created a tag for your release, check it out and then run `make release tag=<your-tag>`. This will build the Docker image and push it to DockerHub.

## More Information

For more information on the Fastly Real-Time Analytics API, look [here](https://docs.fastly.com/api/analytics).
Expand Down

0 comments on commit 4cd1ff6

Please sign in to comment.