Skip to content

added support for arm #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down