diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8b4495..e24f430 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -62,9 +62,9 @@ jobs: IMAGE_TAG: ${{ github.sha }} run: | # Build a docker container and push it to ECR - docker build -t $ECR_REGISTRY/$ECR_REPOSITORY-mirror-api-logging:$IMAGE_TAG . + docker buildx create --use echo "Pushing image to ECR..." - docker push $ECR_REGISTRY/$ECR_REPOSITORY-mirror-api-logging:$IMAGE_TAG + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REPOSITORY-mirror-api-logging:$IMAGE_TAG . --push echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY-mirror-api-logging:$IMAGE_TAG" - name: DockerHub login @@ -83,8 +83,8 @@ jobs: IMAGE_TAG: ${{ github.event.inputs.Tag }} run: | # Build a docker container and push it to DockerHub - docker build -t $ECR_REGISTRY/mirror-api-logging:$IMAGE_TAG . - echo "Pushing image to DockerHub..." - docker push $ECR_REGISTRY/mirror-api-logging:$IMAGE_TAG + docker buildx create --use + echo "Building and Pushing image to DockerHub..." + docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/mirror-api-logging:$IMAGE_TAG . --push echo "::set-output name=image::$ECR_REGISTRY/mirror-api-logging:$IMAGE_TAG" diff --git a/main.go b/main.go index 3846ac2..34d5657 100644 --- a/main.go +++ b/main.go @@ -543,6 +543,13 @@ func main() { interfaceName = "ens4" } + aktoInterfaceName := os.Getenv("AKTO_INTERFACE_NAME") + if len(aktoInterfaceName) > 0 { + interfaceName = aktoInterfaceName + } + + log.Println("Interface name: " + interfaceName) + for { if handle, err := pcap.OpenLive(interfaceName, 128*1024, true, pcap.BlockForever); err != nil { log.Fatal(err)