{"id":23381270,"url":"https://github.com/bvis/docker-varnish","last_synced_at":"2025-04-08T08:26:55.788Z","repository":{"id":149012794,"uuid":"63426095","full_name":"bvis/docker-varnish","owner":"bvis","description":"Docker image to generate varnish containers where the VCL config can be split as you want","archived":false,"fork":false,"pushed_at":"2018-09-04T15:59:32.000Z","size":2762,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-14T05:29:51.850Z","etag":null,"topics":["docker-image","varnish","vcl"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/basi/varnish/","language":"VCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bvis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-07-15T14:01:23.000Z","updated_at":"2018-09-04T15:59:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"c9d83db1-aed0-42d5-9c34-0e1160d024be","html_url":"https://github.com/bvis/docker-varnish","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-varnish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-varnish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-varnish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bvis%2Fdocker-varnish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bvis","download_url":"https://codeload.github.com/bvis/docker-varnish/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247803257,"owners_count":20998733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image","varnish","vcl"],"created_at":"2024-12-21T20:48:38.274Z","updated_at":"2025-04-08T08:26:55.753Z","avatar_url":"https://github.com/bvis.png","language":"VCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://images.microbadger.com/badges/image/basi/varnish.svg)](http://microbadger.com/images/basi/varnish \"Get your own image badge on microbadger.com\") [![](https://images.microbadger.com/badges/version/basi/varnish.svg)](http://microbadger.com/images/basi/varnish \"Get your own version badge on microbadger.com\")\n\n# basi/varnish\nFrom the Debian Jessie distribution it installs a Varnish daemon.\n\n### Varnish\nIt allows you to use an specific VCL file when you provide an environment variable named: `$VCL_CONFIG`. But\nyou can provide a directory instead of a file and the system internally will merge all the \"vcl\" files found in\nthe directory to create the VCL file that will be used by Varnish.\n\nThis approach is useful when you have complicated Varnish logic, and it allows to use small consul-template templates.\n\nAs the provided VCL is split in pieces you can overwrite each piece individually in your container or the entire\ndirectory.\n\n## Example of use\n\n### Provide a directory with the logic split in files\n\n    docker run --rm -it -P --add-host web:127.0.0.1 \\\n        -v $PWD/rootfs/etc/varnish/conf.d/:/etc/varnish/conf.d/ \\\n        -e VCL_CONFIG=/etc/varnish/conf.d \\\n        basi/varnish\n\nIt will use the VCL files contained in the volume instead of the originally available files provided by the image.\nIf you want to change one VCL status you just need to to it with:\n\n    docker run --rm -it -P --add-host web:127.0.0.1 \\\n        -v $PWD/rootfs/etc/varnish/conf.d/30-vcl_deliver.vcl:/etc/varnish/conf.d/30-vcl_deliver.vcl \\\n        -e VCL_CONFIG=/etc/varnish/conf.d \\\n        basi/varnish\n\nAnd it will just switch just the logic executed in the vcl_deliver status by yours.\n\n### Provide a full VCL file\n\nAnother possibility is just give to the system a full VCL file. The needed parameters would be something similar to:\n\n    docker run --rm -it -P --add-host web:127.0.0.1 \\\n        -v $PWD/rootfs/etc/varnish/default.vcl:/etc/varnish/default.vcl \\\n        -e VCL_CONFIG=/etc/varnish/default.vcl \\\n        basi/varnish\n\nNOTE: As you may see in the examples the \"web\" name is resolved as localhost, usually you will provide your service name in the VCL.\n\n### Basic header debugging\n\nIf in your request you include the header: `X-Cache-Debug: u0AJAlRWN4` you can get extra headers in your response.\nYou can change the default secret value using an environmental variable.\n\n### Other supported parameters:\n\n`$CACHE_SIZE`:           Determines the cache size used by varnish\n`$VARNISHD_PARAMS`:      Other parameters you want to pass to the varnish daemon\n`$VARNISH_DEBUG_SECRET`: Change the default debug password\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbvis%2Fdocker-varnish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbvis%2Fdocker-varnish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbvis%2Fdocker-varnish/lists"}