version: '2.1' services: app: build: context: . working_dir: "/app" # Platform is being enforced here to solve issues like: # issue /usr/bin/ld: skipping incompatible /usr/local/lib/libavdevice.so when searching for -lavdevice # # The tools to check the compiled objects format showed: # objdump -a /opt/srt_lib/lib/libsrt.so (file format elf64-littleaarch64) # objdump -a /usr/local/lib/libavformat.so (file format elf64-little) # # Once the platform was fixed, the problem disappeared. Even though the configured platform # is amd64, the final objects are x64, don't know why yet. platform: "linux/amd64" volumes: - "./:/app/" ports: - "8080:8080" - "8081:8081" - "8081:8081/udp" - "6060:6060" depends_on: - srt links: - srt test: build: context: . dockerfile: Dockerfile-dev working_dir: "/app" platform: "linux/amd64" volumes: - "./:/app/" command: "go test -v ./..." lint: build: context: . dockerfile: Dockerfile-dev working_dir: "/app" platform: "linux/amd64" volumes: - "./:/app/" command: "golangci-lint run -v" srt: build: context: . dockerfile: Dockerfile-srt-live entrypoint: sh command: "./srt.sh" working_dir: "/scripts" volumes: - "./scripts:/scripts" environment: - SRT_LISTENING_PORT=40052 - SRT_UDP_TS_INPUT_HOST=0.0.0.0 - SRT_UDP_TS_INPUT_PORT=1234 ports: - "40052:40052/udp" depends_on: - origin links: - origin origin: # simulating an mpeg-ts upd origin live transmission image: jrottenberg/ffmpeg:4.4-alpine entrypoint: sh command: "/scripts/ffmpeg_mpegts_udp.sh" volumes: - "./scripts:/scripts" environment: - SRT_INPUT_HOST=srt - SRT_INPUT_PORT=1234 - PKT_SIZE=1316