[{"data":1,"prerenderedAt":627},["ShallowReactive",2],{"navigation":3,"/docs/image-variations/cli":221,"/docs/image-variations/cli-surround":622},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","/docs","docs",[9,12,56,85,132,153,178,195,208],{"title":10,"path":6,"stem":11},"","docs/index",{"title":13,"path":14,"stem":15,"children":16,"icon":55},"Getting Started","/docs/getting-started","docs/1.getting-started/1.index",[17,19,23,27,31,35,39,43,47,51],{"title":18,"path":14,"stem":15},"Introduction",{"title":20,"path":21,"stem":22},"Container Basics","/docs/getting-started/container-basics","docs/1.getting-started/2.container-basics",{"title":24,"path":25,"stem":26},"Installation","/docs/getting-started/installation","docs/1.getting-started/3.installation",{"title":28,"path":29,"stem":30},"These Images vs Others","/docs/getting-started/these-images-vs-others","docs/1.getting-started/4.these-images-vs-others",{"title":32,"path":33,"stem":34},"Choosing an Image","/docs/getting-started/choosing-an-image","docs/1.getting-started/5.choosing-an-image",{"title":36,"path":37,"stem":38},"Default Configurations","/docs/getting-started/default-configurations","docs/1.getting-started/6.default-configurations",{"title":40,"path":41,"stem":42},"Upgrade Guide","/docs/getting-started/upgrade-guide","docs/1.getting-started/7.upgrade-guide",{"title":44,"path":45,"stem":46},"Changelog","/docs/getting-started/changelog","docs/1.getting-started/8.changelog",{"title":48,"path":49,"stem":50},"About","/docs/getting-started/about","docs/1.getting-started/9.about",{"title":52,"path":53,"stem":54},"Contributing","/docs/getting-started/contributing","docs/1.getting-started/99.contributing",false,{"title":57,"path":58,"stem":59,"children":60,"page":55},"Image Variations","/docs/image-variations","docs/2.image-variations",[61,65,69,73,77,81],{"title":62,"path":63,"stem":64},"CLI","/docs/image-variations/cli","docs/2.image-variations/cli",{"title":66,"path":67,"stem":68},"FPM","/docs/image-variations/fpm","docs/2.image-variations/fpm",{"title":70,"path":71,"stem":72},"FPM-Apache","/docs/image-variations/fpm-apache","docs/2.image-variations/fpm-apache",{"title":74,"path":75,"stem":76},"FPM-NGINX","/docs/image-variations/fpm-nginx","docs/2.image-variations/fpm-nginx",{"title":78,"path":79,"stem":80},"FrankenPHP","/docs/image-variations/frankenphp","docs/2.image-variations/frankenphp",{"title":82,"path":83,"stem":84},"Unit (Deprecated)","/docs/image-variations/unit","docs/2.image-variations/unit",{"title":86,"path":87,"stem":88,"children":89,"page":55},"Framework Guides","/docs/framework-guides","docs/3.framework-guides",[90,123],{"title":91,"icon":55,"defaultOpen":55,"path":92,"stem":93,"children":94,"page":55},"Laravel","/docs/framework-guides/laravel","docs/3.framework-guides/1.laravel",[95,99,103,107,111,115,119],{"title":96,"path":97,"stem":98},"Automations","/docs/framework-guides/laravel/automations","docs/3.framework-guides/1.laravel/1.automations",{"title":100,"path":101,"stem":102},"Task Scheduler","/docs/framework-guides/laravel/task-scheduler","docs/3.framework-guides/1.laravel/2.task-scheduler",{"title":104,"path":105,"stem":106},"Queue","/docs/framework-guides/laravel/queue","docs/3.framework-guides/1.laravel/3.queue",{"title":108,"path":109,"stem":110},"Horizon","/docs/framework-guides/laravel/horizon","docs/3.framework-guides/1.laravel/4.horizon",{"title":112,"path":113,"stem":114},"Reverb","/docs/framework-guides/laravel/reverb","docs/3.framework-guides/1.laravel/4.reverb",{"title":116,"path":117,"stem":118},"Nightwatch","/docs/framework-guides/laravel/nightwatch","docs/3.framework-guides/1.laravel/5.nightwatch",{"title":120,"path":121,"stem":122},"Octane","/docs/framework-guides/laravel/octane","docs/3.framework-guides/1.laravel/octane",{"title":124,"icon":55,"defaultOpen":55,"path":125,"stem":126,"children":127,"page":55},"WordPress","/docs/framework-guides/wordpress","docs/3.framework-guides/2.wordpress",[128],{"title":129,"path":130,"stem":131},"Using Docker with WordPress","/docs/framework-guides/wordpress/using-wordpress-with-docker","docs/3.framework-guides/2.wordpress/4.using-wordpress-with-docker",{"title":133,"path":134,"stem":135,"children":136,"page":55},"Deployment And Production","/docs/deployment-and-production","docs/4.deployment-and-production",[137,141,145,149],{"title":138,"path":139,"stem":140},"Development to Production","/docs/deployment-and-production/development-to-production","docs/4.deployment-and-production/2.development-to-production",{"title":142,"path":143,"stem":144},"Packaging Your App for Deployment","/docs/deployment-and-production/packaging-your-app-for-deployment","docs/4.deployment-and-production/3.packaging-your-app-for-deployment",{"title":146,"path":147,"stem":148},"Configuring SSL","/docs/deployment-and-production/configuring-ssl","docs/4.deployment-and-production/4.configuring-ssl",{"title":150,"path":151,"stem":152},"Choosing a Host","/docs/deployment-and-production/choosing-a-host","docs/4.deployment-and-production/5.choosing-a-host",{"title":154,"icon":55,"defaultOpen":55,"path":155,"stem":156,"children":157,"page":55},"Advanced Guides","/docs/guide","docs/5.guide",[158,162,166,170,174],{"title":159,"path":160,"stem":161},"Migrating from official PHP images","/docs/guide/migrating-from-official-php-images","docs/5.guide/1.migrating-from-official-php-images",{"title":163,"path":164,"stem":165},"Using Healthchecks With Laravel","/docs/guide/using-healthchecks-with-laravel","docs/5.guide/2.using-healthchecks-with-laravel",{"title":167,"path":168,"stem":169},"Using S6 Overlay","/docs/guide/using-s6-overlay","docs/5.guide/2.using-s6-overlay",{"title":171,"path":172,"stem":173},"Understanding File Permissions","/docs/guide/understanding-file-permissions","docs/5.guide/3.understanding-file-permissions",{"title":175,"path":176,"stem":177},"Configuring Trusted Proxies","/docs/guide/configuring-trusted-proxies","docs/5.guide/4.configuring-trusted-proxies",{"title":179,"icon":55,"defaultOpen":55,"path":180,"stem":181,"children":182,"page":55},"Customization","/docs/customizing-the-image","docs/6.customizing-the-image",[183,187,191],{"title":184,"path":185,"stem":186},"Changing php.ini settings","/docs/customizing-the-image/changing-common-php-settings","docs/6.customizing-the-image/1.changing-common-php-settings",{"title":188,"path":189,"stem":190},"Installing PHP extensions","/docs/customizing-the-image/installing-additional-php-extensions","docs/6.customizing-the-image/2.installing-additional-php-extensions",{"title":192,"path":193,"stem":194},"Adding Start Up Scripts","/docs/customizing-the-image/adding-your-own-start-up-scripts","docs/6.customizing-the-image/3.adding-your-own-start-up-scripts",{"title":196,"path":197,"stem":198,"children":199,"page":55},"Troubleshooting","/docs/troubleshooting","docs/7.troubleshooting",[200,204],{"title":201,"path":202,"stem":203},"Common Issues","/docs/troubleshooting/common-issues","docs/7.troubleshooting/1.common-issues",{"title":205,"path":206,"stem":207},"Getting Help","/docs/troubleshooting/getting-help","docs/7.troubleshooting/2.getting-help",{"title":209,"path":210,"stem":211,"children":212,"page":55},"Reference","/docs/reference","docs/8.reference",[213,217],{"title":214,"path":215,"stem":216},"Environment Variable Specification","/docs/reference/environment-variable-specification","docs/8.reference/1.environment-variable-specification",{"title":218,"path":219,"stem":220},"Command Reference","/docs/reference/command-reference","docs/8.reference/2.command-reference",{"id":222,"title":62,"body":223,"description":615,"extension":616,"links":617,"meta":618,"navigation":619,"path":63,"redirect":617,"seo":620,"stem":64,"__hash__":621},"docs/docs/2.image-variations/cli.md",{"type":224,"value":225,"toc":607},"minimark",[226,236,241,244,257,262,267,271,376,380,383,388,436,447,451,457,511,521,542,545,562,582,586,589,603],[227,228,229,233],"lead-p",{},[230,231,232],"p",{},"The CLI variation is a minimal image designed for running PHP from the command line only. It does not include a web server.",[230,234,235],{},"Use this variation for running commands like Composer, running one-off scripts, or executing PHP commands that don't require a web server.",[237,238,240],"h2",{"id":239},"when-to-use-cli","When to Use CLI",[230,242,243],{},"Use the CLI variation when you need to:",[245,246,247,251,254],"ul",{},[248,249,250],"li",{},"Run Composer for dependency management",[248,252,253],{},"Execute one-off PHP scripts",[248,255,256],{},"Need a very small image size",[258,259,261],"h4",{"id":260},"perfect-for","Perfect for",[245,263,264],{},[248,265,266],{},"Running PHP locally without needing to install PHP on your host system.",[258,268,270],{"id":269},"whats-inside","What's Inside",[272,273,274,287],"table",{},[275,276,277],"thead",{},[278,279,280,284],"tr",{},[281,282,283],"th",{},"Item",[281,285,286],{},"Status",[288,289,290,299,306,317,327,334,342,350,358,366],"tbody",{},[278,291,292,296],{},[293,294,295],"td",{},"PHP CLI binary",[293,297,298],{},"✅",[278,300,301,304],{},[293,302,303],{},"Common PHP extensions",[293,305,298],{},[278,307,308,315],{},[293,309,310,314],{},[311,312,313],"code",{},"composer"," executable",[293,316,298],{},[278,318,319,325],{},[293,320,321,324],{},[311,322,323],{},"install-php-extensions"," script",[293,326,298],{},[278,328,329,332],{},[293,330,331],{},"Essential system utilities",[293,333,298],{},[278,335,336,339],{},[293,337,338],{},"Native health checks",[293,340,341],{},"❌",[278,343,344,347],{},[293,345,346],{},"Web server",[293,348,349],{},"❌ (no web server included)",[278,351,352,355],{},[293,353,354],{},"Process management",[293,356,357],{},"Single entrypoint, single process",[278,359,360,363],{},[293,361,362],{},"Exposed Ports",[293,364,365],{},"None",[278,367,368,371],{},[293,369,370],{},"Stop Signal",[293,372,373],{},[311,374,375],{},"SIGTERM",[237,377,379],{"id":378},"quick-start","Quick Start",[230,381,382],{},"Here are a few quick examples to get you started.",[384,385,387],"h3",{"id":386},"docker-cli","Docker CLI",[389,390,395],"pre",{"className":391,"code":392,"filename":393,"language":394,"meta":10,"style":10},"language-bash shiki shiki-themes github-dark","docker run -it -v $(pwd):/var/www/html serversideup/php:cli bash\n","Terminal","bash",[311,396,397],{"__ignoreMap":10},[398,399,402,406,410,414,417,421,424,427,430,433],"span",{"class":400,"line":401},"line",1,[398,403,405],{"class":404},"svObZ","docker",[398,407,409],{"class":408},"sU2Wk"," run",[398,411,413],{"class":412},"sDLfK"," -it",[398,415,416],{"class":412}," -v",[398,418,420],{"class":419},"s95oV"," $(",[398,422,423],{"class":412},"pwd",[398,425,426],{"class":419},")",[398,428,429],{"class":408},":/var/www/html",[398,431,432],{"class":408}," serversideup/php:cli",[398,434,435],{"class":408}," bash\n",[230,437,438,439,442,443,446],{},"The above command will mount your current directory as the ",[311,440,441],{},"/var/www/html"," directory in the container and open a bash shell inside the container where PHP is installed. To exit, just type ",[311,444,445],{},"exit",".",[384,448,450],{"id":449},"docker-compose","Docker Compose",[230,452,453,454,456],{},"If you want something more repeatable, you can use Docker Compose to start a container with the CLI variation and mount your current directory as the ",[311,455,441],{}," directory in the container.",[389,458,463],{"className":459,"code":460,"filename":461,"language":462,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  php:\n    image: serversideup/php:cli\n    volumes:\n      - ./:/var/www/html\n","compose.yml","yml",[311,464,465,474,482,494,502],{"__ignoreMap":10},[398,466,467,471],{"class":400,"line":401},[398,468,470],{"class":469},"s4JwU","services",[398,472,473],{"class":419},":\n",[398,475,477,480],{"class":400,"line":476},2,[398,478,479],{"class":469},"  php",[398,481,473],{"class":419},[398,483,485,488,491],{"class":400,"line":484},3,[398,486,487],{"class":469},"    image",[398,489,490],{"class":419},": ",[398,492,493],{"class":408},"serversideup/php:cli\n",[398,495,497,500],{"class":400,"line":496},4,[398,498,499],{"class":469},"    volumes",[398,501,473],{"class":419},[398,503,505,508],{"class":400,"line":504},5,[398,506,507],{"class":419},"      - ",[398,509,510],{"class":408},"./:/var/www/html\n",[230,512,513,514,516,517,520],{},"Once you have your ",[311,515,461],{}," file set, you can use the ",[311,518,519],{},"docker compose"," cli to start a container with your configuration.",[389,522,524],{"className":391,"code":523,"filename":393,"language":394,"meta":10,"style":10},"docker compose run -it php bash\n",[311,525,526],{"__ignoreMap":10},[398,527,528,530,533,535,537,540],{"class":400,"line":401},[398,529,405],{"class":404},[398,531,532],{"class":408}," compose",[398,534,409],{"class":408},[398,536,413],{"class":412},[398,538,539],{"class":408}," php",[398,541,435],{"class":408},[230,543,544],{},"Or you can pass commands directly to the container without starting a shell.",[546,547,548],"note",{},[230,549,550,551,554,555,558,559,561],{},"Don't get confused. ",[311,552,553],{},"php"," is in this command twice because it's the name of the service and the command to run inside the container. If this is too confusing, you can set your service name to something else like ",[311,556,557],{},"app"," in your ",[311,560,461],{}," file.",[389,563,565],{"className":391,"code":564,"filename":393,"language":394,"meta":10,"style":10},"docker compose run php php my-script.php\n",[311,566,567],{"__ignoreMap":10},[398,568,569,571,573,575,577,579],{"class":400,"line":401},[398,570,405],{"class":404},[398,572,532],{"class":408},[398,574,409],{"class":408},[398,576,539],{"class":408},[398,578,539],{"class":408},[398,580,581],{"class":408}," my-script.php\n",[384,583,585],{"id":584},"further-customization","Further Customization",[230,587,588],{},"If you need to customize the container further, reference the docs below:",[245,590,591,598],{},[248,592,593,597],{},[594,595,596],"a",{"href":215},"Environment Variable Specifications"," - See which environment variables are available to customize common PHP settings.",[248,599,600,602],{},[594,601,218],{"href":219}," - See which commands are available to run inside the container.",[604,605,606],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}",{"title":10,"searchDepth":476,"depth":476,"links":608},[609,610],{"id":239,"depth":476,"text":240},{"id":378,"depth":476,"text":379,"children":611},[612,613,614],{"id":386,"depth":484,"text":387},{"id":449,"depth":484,"text":450},{"id":584,"depth":484,"text":585},"Learn how to use the CLI variation of the serversideup/php image.","md",null,{},true,{"title":62,"description":615},"9l5cZF6xT0Fwpy0bQVdcKGtiqqHAsex7csgebeTlliU",[623,625],{"title":52,"path":53,"stem":54,"description":624,"children":-1},"Learn how you can make a difference and contribute to the Docker PHP project.",{"title":66,"path":67,"stem":68,"description":626,"children":-1},"Learn how to use the FPM variation of the serversideup/php image.",1776367053013]