buger / goreplay

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.

Home Page:https://goreplay.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docker with GoReplay on Mac M1 get "exec ./gor: exec format error"

mosheeshel opened this issue · comments

Trying to create a docker-compose harness to run goreplay locally
this is the dockerfile

FROM alpine:3.16 as builder

ARG RELEASE_VERSION=1.3.3

RUN apk add --no-cache ca-certificates openssl
RUN wget https://github.com/buger/goreplay/releases/download/${RELEASE_VERSION}/gor_${RELEASE_VERSION}_mac.tar.gz -O gor.tar.gz
RUN tar xzf gor.tar.gz
RUN chmod 775 gor

ENTRYPOINT ["./gor"]

This is the docker-compose.yml

version: '3.8'
services:
#..... more services, not important
  golistener:
    network_mode: "host"
    build: ./goreplay

    stdin_open: true
    platform: linux/amd64
    entrypoint:
      - './gor'
      - '--input-raw=:8080'
      - '--output-stdout'

I build this with docker-compose --verbose up --build

My buildX configuration uses --platform linux/amd64
I also tried using the x86_64 and x64 - then I get the error:
2023/05/22 15:16:01 tunl0: SIOCETHTOOL(ETHTOOL_GLINK) ioctl failed: Function not implemented

another thing I tried was to run it as an application on the terminal directly (no Docker) - this works just fine, but I need it in a docker - any ideas?

Hi! To be frank it works find on mac using standard binaries. Docker on M1 is a tricky one...

@buger Yes, I tested the Mac build on my M1 and it indeed works fine.
If you have any tips on a docker version with M1, I'd love to hear...
Having known GoReplay when it was simply Gor :-) about 10 years ago, I am constantly amazed by your work! so thanks!