1

When I run a Docker image for Varnish, I get the error "Running VCC-compiler failed, signal 5". This happens even when using a minimal VCL config.

$ docker run vdmk/varnish
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Waiting 5s before startup...
Copying config from /opt/default.vcl...
Evaluating config variables...
Starting varnishd...
Error:
Running VCC-compiler failed, signal 5
VCL compilation failed
Starting varnishlog...
Can't open log - retrying for 5 seconds
Can't open VSM file (Cannot open /var/lib/varnish/ba99fc13f2d1/_.vsm: No such file or directory
)

How can I fix it?

Daniel Compton
  • 13,878
  • 4
  • 40
  • 60

1 Answers1

1

The problem is that you are trying to run an x86 Docker image for Varnish on an M1 (ARM) Mac. Some x86 Docker images will run, but this one doesn't. This is probably related to the Varnish VCL compiler.

The fix is to use a Docker image for Varnish that has an ARM build. The official Docker images for Varnish have builds for ARM64v8 which do run on M1 Macs:

$ docker run varnish
Warnings:
VCL compiled.

Debug: Version: varnish-6.6.1 revision e6a8c860944c4f6a7e1af9f40674ea78bbdcdc66
Debug: Platform: Linux,5.10.25-linuxkit,aarch64,-junix,-smalloc,-sdefault,-hcritbit
Debug: Child (22) Started
Info: Child (22) said Child starts
Daniel Compton
  • 13,878
  • 4
  • 40
  • 60