[{"data":1,"prerenderedAt":1234},["ShallowReactive",2],{"navigation":3,"/docs/getting-started/container-basics":221,"/docs/getting-started/container-basics-surround":1229},[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":20,"body":223,"description":1224,"extension":1197,"links":1225,"meta":1226,"navigation":973,"path":21,"redirect":1225,"seo":1227,"stem":22,"__hash__":1228},"docs/docs/1.getting-started/2.container-basics.md",{"type":224,"value":225,"toc":1204},"minimark",[226,231,240,243,271,274,384,388,391,398,403,406,415,418,461,464,468,477,486,489,493,503,507,526,542,545,549,552,555,569,573,577,584,609,671,674,703,709,729,733,739,759,770,781,784,793,797,804,821,827,836,840,843,875,878,886,890,893,925,928,942,946,949,1156,1177,1181,1184,1200],[227,228,230],"h2",{"id":229},"why-even-care-about-containers","Why even care about containers?",[232,233,234,235,239],"p",{},"If you're new to Docker or containers, you might be wondering why you should containerize your application in the first place. The short answer: ",[236,237,238],"strong",{},"containers let you run your application anywhere"," — from your laptop to any cloud provider — with zero changes.",[232,241,242],{},"Key benefits of containerization:",[244,245,246,253,259,265],"ul",{},[247,248,249,252],"li",{},[236,250,251],{},"Consistency"," - Your app runs the same on Mac, Windows, Linux, and production",[247,254,255,258],{},[236,256,257],{},"Confidence"," - Infrastructure as code means easier testing and rollbacks",[247,260,261,264],{},[236,262,263],{},"Freedom"," - No vendor lock-in; migrate hosts with minimal effort",[247,266,267,270],{},[236,268,269],{},"Simplicity"," - Scaling from 1 to 100 containers is straightforward",[232,272,273],{},"There are some important terms to understand when working with containers:",[275,276,277,290],"table",{},[278,279,280],"thead",{},[281,282,283,287],"tr",{},[284,285,286],"th",{},"Term",[284,288,289],{},"Definition",[291,292,293,302,315,326,348,356,376],"tbody",{},[281,294,295,299],{},[296,297,298],"td",{},"Container",[296,300,301],{},"A running instance of an image.",[281,303,304,307],{},[296,305,306],{},"Image",[296,308,309,310,314],{},"A template for a container to start with (ie. ",[311,312,313],"code",{},"serversideup/php:8.5-frankenphp",").",[281,316,317,320],{},[296,318,319],{},"Tag",[296,321,322,323,314],{},"A specific version of an image (ie. ",[311,324,325],{},"8.5-frankenphp",[281,327,328,331],{},[296,329,330],{},"Registry",[296,332,333,334,341,342,347],{},"A repository of images. This is where users can pull images from to start a container. This can be places like ",[335,336,340],"a",{"href":337,"rel":338},"https://hub.docker.com/r/serversideup/php",[339],"nofollow","Docker Hub"," or ",[335,343,346],{"href":344,"rel":345},"https://github.com/serversideup/docker-php/pkgs/container/php",[339],"GitHub Packages",".",[281,349,350,353],{},[296,351,352],{},"Volume",[296,354,355],{},"A directory on your host machine that is mounted into a container. This allows you to share files between your host machine and the container.",[281,357,358,361],{},[296,359,360],{},"Port",[296,362,363,364,367,368,371,372,375],{},"Ports are virtual numbers organizing network data traffic, directing it to the correct application on a device. If you want to expose traffic to work with ",[311,365,366],{},"http://localhost",", you would map port ",[311,369,370],{},"80"," on your host machine to port ",[311,373,374],{},"8080"," on the container.",[281,377,378,381],{},[296,379,380],{},"Environment Variable",[296,382,383],{},"A variable that is set in the container's environment. This allows you to configure the container's behavior.",[227,385,387],{"id":386},"what-are-containers","What are containers?",[232,389,390],{},"Containers are isolated environments that can run on any host. They are a great way to package your application and all of its dependencies into a single unit that can be easily deployed to any environment.",[232,392,393],{},[394,395],"img",{"alt":396,"src":397},"Container Layers with Laravel Application","images/docs/container-layers.png",[399,400,402],"h3",{"id":401},"why-containerize-at-all","Why containerize at all?",[232,404,405],{},"Going through the efforts of containerizing your application gives you one extremely powerful capability:",[407,408,409],"blockquote",{},[232,410,411,412],{},"👉 ",[236,413,414],{},"You can run your application anywhere.",[232,416,417],{},"Once you're at this level, you unlock a ton of new possibilities:",[244,419,420,426,437,443,449,455],{},[247,421,422,425],{},[236,423,424],{},"Your application runs the same across Mac, Windows, and Linux"," - no more \"it works on my machine\". Run 100% of your application on any operating system. All they need is Docker installed.",[247,427,428,431,432,436],{},[236,429,430],{},"Ship with more confidence"," - all infrastructure configurations are ",[433,434,435],"em",{},"centrally managed"," in Git, so you can change, test and rollback with ease",[247,438,439,442],{},[236,440,441],{},"No more vendor lock-in"," - if a host raises their prices on you, you can migrate with very little effort",[247,444,445,448],{},[236,446,447],{},"Scaling is a breeze"," - once you get your application in one container, it's so easy to scale up to any number of containers",[247,450,451,454],{},[236,452,453],{},"Improved security"," - containerized apps are more secure than traditional apps because they are isolated from the host",[247,456,457,460],{},[236,458,459],{},"Better uptime"," - if something fails during deployment, you can roll back your application to a previous version",[232,462,463],{},"The crazier part is you don't need a Platform as an expensive Service (PaaS) to get all these benefits. Everything can be done with 100% free and open source tools.",[227,465,467],{"id":466},"docker-vs-containers","Docker vs. Containers",[232,469,470,471,476],{},"When you're first learning about containers, you'll likely hear the terms \"Docker\" and \"containers\" used interchangeably. While they are related, they are not the same thing. ",[335,472,475],{"href":473,"rel":474},"https://www.docker.com/",[339],"Docker"," is an open source utility for building, shipping, and running applications in containers. It's one of the most popular tools for containerization.",[232,478,479,480,485],{},"Although you may see us reference things as \"Docker containers\", we're actually referring to the broader concept of containers because containers follow a standard known as the ",[335,481,484],{"href":482,"rel":483},"https://opencontainers.org/",[339],"OCI (Open Container Initiative)",". This means Docker containers can run on any container orchestrator that supports the OCI standard (like Kubernetes, Docker Swarm, Docker Compose, HashiCorp Nomad, etc.).",[232,487,488],{},"So although we're going to show you best practices with Docker, this means you'll maintain your freedom and flexibility to choose how you want to run your containers.",[227,490,492],{"id":491},"how-containers-work","How containers work",[232,494,495,496,499,500,347],{},"If you followed our ",[335,497,498],{"href":25},"installation guide",", you've already run containers and seen them in action. Let's break down what actually happened when you ran ",[311,501,502],{},"docker compose up",[399,504,506],{"id":505},"images-vs-containers","Images vs Containers",[232,508,509,510,513,514,517,518,521,522,525],{},"Think of an ",[236,511,512],{},"image"," as a blueprint and a ",[236,515,516],{},"container"," as the actual running instance of that blueprint. When you specified ",[311,519,520],{},"image: serversideup/php:8.5-fpm-nginx"," in your ",[311,523,524],{},"compose.yml",", you told Docker to:",[527,528,529,536,539],"ol",{},[247,530,531,532,535],{},"Download the ",[311,533,534],{},"serversideup/php:8.5-fpm-nginx"," image (the blueprint)",[247,537,538],{},"Create a container from that image (the running instance)",[247,540,541],{},"Start the container with your specified configuration",[232,543,544],{},"You can create multiple containers from the same image — just like you can build multiple houses from the same blueprint. Each container runs independently with its own isolated filesystem and processes.",[399,546,548],{"id":547},"understanding-image-layers","Understanding image layers",[232,550,551],{},"Container images are built in layers, like a stack of pancakes. Each layer adds something new: the operating system, PHP, web servers, and configurations. When you pull an image, Docker downloads only the layers you don't already have, making updates incredibly efficient.",[232,553,554],{},"This is why switching from PHP 8.3 to 8.4 in the installation guide was so fast — most of the layers were already on your machine, and Docker only downloaded the differences.",[556,557,558],"tip",{},[232,559,560,561,564,565,568],{},"Image tags like ",[311,562,563],{},"8.3-fpm-nginx"," and ",[311,566,567],{},"8.4-frankenphp"," aren't just version numbers — they describe the entire stack that's included in that image. The tag tells you the PHP version and which variation (web server stack) you're getting.",[227,570,572],{"id":571},"key-concepts","Key concepts",[399,574,576],{"id":575},"service-names","Service names",[232,578,579,580,583],{},"A ",[236,581,582],{},"service"," in Docker Compose is a named container definition. Think of it as a label for a specific part of your application — like your web server, database, or cache. Each service runs in its own container and can be managed independently.",[232,585,586,587,589,590,593,594,596,597,600,601,604,605,608],{},"In your ",[311,588,524],{},", when you define a service called ",[311,591,592],{},"php",", you're telling Docker Compose \"this is my PHP application server.\" You can name it anything you want — we use ",[311,595,592],{}," to keep it simple, but ",[311,598,599],{},"web",", ",[311,602,603],{},"app",", or ",[311,606,607],{},"backend"," would work just as well.",[610,611,617],"pre",{"className":612,"code":613,"filename":524,"highlights":614,"language":616,"meta":10,"style":10},"language-yml shiki shiki-themes github-dark","services:\n  php:\n    image: serversideup/php:8.5-fpm-nginx\n    ports:\n      - 80:8080\n",[615],2,"yml",[311,618,619,632,641,654,662],{"__ignoreMap":10},[620,621,624,628],"span",{"class":622,"line":623},"line",1,[620,625,627],{"class":626},"s4JwU","services",[620,629,631],{"class":630},"s95oV",":\n",[620,633,636,639],{"class":634,"line":615},[622,635],"highlight",[620,637,638],{"class":626},"  php",[620,640,631],{"class":630},[620,642,644,647,650],{"class":622,"line":643},3,[620,645,646],{"class":626},"    image",[620,648,649],{"class":630},": ",[620,651,653],{"class":652},"sU2Wk","serversideup/php:8.5-fpm-nginx\n",[620,655,657,660],{"class":622,"line":656},4,[620,658,659],{"class":626},"    ports",[620,661,631],{"class":630},[620,663,665,668],{"class":622,"line":664},5,[620,666,667],{"class":630},"      - ",[620,669,670],{"class":652},"80:8080\n",[232,672,673],{},"Whenever you run commands, you'll need to reference the service name you gave it.",[610,675,680],{"className":676,"code":677,"filename":678,"language":679,"meta":10,"style":10},"language-bash shiki shiki-themes github-dark","docker compose run php php -v\n","Terminal","bash",[311,681,682],{"__ignoreMap":10},[620,683,684,688,691,694,697,699],{"class":622,"line":623},[620,685,687],{"class":686},"svObZ","docker",[620,689,690],{"class":652}," compose",[620,692,693],{"class":652}," run",[620,695,696],{"class":652}," php",[620,698,696],{"class":652},[620,700,702],{"class":701},"sDLfK"," -v\n",[232,704,705,706,708],{},"If you named your service ",[311,707,603],{},", you would run the following command:",[610,710,712],{"className":676,"code":711,"filename":678,"language":679,"meta":10,"style":10},"docker compose run app php -v\n",[311,713,714],{"__ignoreMap":10},[620,715,716,718,720,722,725,727],{"class":622,"line":623},[620,717,687],{"class":686},[620,719,690],{"class":652},[620,721,693],{"class":652},[620,723,724],{"class":652}," app",[620,726,696],{"class":652},[620,728,702],{"class":701},[399,730,732],{"id":731},"volumes-sharing-files-with-containers","Volumes: Sharing files with containers",[232,734,735,736,738],{},"When you added this to your ",[311,737,524],{},":",[610,740,742],{"className":612,"code":741,"language":616,"meta":10,"style":10},"volumes:\n  - ./:/var/www/html\n",[311,743,744,751],{"__ignoreMap":10},[620,745,746,749],{"class":622,"line":623},[620,747,748],{"class":626},"volumes",[620,750,631],{"class":630},[620,752,753,756],{"class":622,"line":615},[620,754,755],{"class":630},"  - ",[620,757,758],{"class":652},"./:/var/www/html\n",[232,760,761,762,765,766,769],{},"You created a ",[236,763,764],{},"bind mount"," that connects your local project directory to the container's ",[311,767,768],{},"/var/www/html"," directory. This means:",[244,771,772,775,778],{},[247,773,774],{},"Changes you make on your computer are instantly visible inside the container",[247,776,777],{},"The container serves your actual project files, not a copy",[247,779,780],{},"When the container stops, your files remain on your computer",[232,782,783],{},"This is perfect for development because you can edit files with your favorite editor and see changes immediately without rebuilding the container.",[785,786,787],"note",{},[232,788,789,790,347],{},"In production, you'll typically build your application files directly into the image instead of using volumes. We cover this in our ",[335,791,792],{"href":143},"packaging guide",[399,794,796],{"id":795},"ports-accessing-your-container","Ports: Accessing your container",[232,798,799,800,803],{},"The ",[311,801,802],{},"ports"," configuration maps ports between your computer and the container:",[610,805,807],{"className":612,"code":806,"language":616,"meta":10,"style":10},"ports:\n  - 80:8080\n",[311,808,809,815],{"__ignoreMap":10},[620,810,811,813],{"class":622,"line":623},[620,812,802],{"class":626},[620,814,631],{"class":630},[620,816,817,819],{"class":622,"line":615},[620,818,755],{"class":630},[620,820,670],{"class":652},[232,822,823,824,826],{},"This means \"take port 8080 inside the container and make it available on port 80 on my computer.\" When you visited ",[311,825,366],{}," in your browser, you were actually connecting to port 80 on your computer, which Docker forwarded to port 8080 inside the container where NGINX or FrankenPHP was listening.",[828,829,830],"warning",{},[232,831,832,833,347],{},"Only one service can use a port at a time. If you get a \"port already in use\" error, another service on your computer is already using that port. Try using a different port like ",[311,834,835],{},"8000:8080",[399,837,839],{"id":838},"environment-variables-configuring-your-container","Environment variables: Configuring your container",[232,841,842],{},"Environment variables let you configure your container without modifying the image. When you set:",[610,844,846],{"className":612,"code":845,"language":616,"meta":10,"style":10},"environment:\n  PHP_UPLOAD_MAX_FILE_SIZE: \"500M\"\n  PHP_OPCACHE_ENABLE: \"1\"\n",[311,847,848,855,865],{"__ignoreMap":10},[620,849,850,853],{"class":622,"line":623},[620,851,852],{"class":626},"environment",[620,854,631],{"class":630},[620,856,857,860,862],{"class":622,"line":615},[620,858,859],{"class":626},"  PHP_UPLOAD_MAX_FILE_SIZE",[620,861,649],{"class":630},[620,863,864],{"class":652},"\"500M\"\n",[620,866,867,870,872],{"class":622,"line":643},[620,868,869],{"class":626},"  PHP_OPCACHE_ENABLE",[620,871,649],{"class":630},[620,873,874],{"class":652},"\"1\"\n",[232,876,877],{},"You're telling our PHP images to adjust PHP's configuration. Our images read these variables at startup and automatically configure PHP accordingly. This means the same image can be configured differently for development, staging, and production — just by changing environment variables.",[556,879,880],{"to":215},[232,881,882,883,885],{},"Check out our ",[335,884,214],{"href":215}," to see all available configuration options.",[227,887,889],{"id":888},"the-container-lifecycle","The container lifecycle",[232,891,892],{},"Understanding the lifecycle helps you work more effectively with containers:",[527,894,895,904,910,919],{},[247,896,897,900,901,903],{},[236,898,899],{},"Create & Start"," - ",[311,902,502],{}," creates and starts containers",[247,905,906,909],{},[236,907,908],{},"Running"," - Your application is active and serving requests",[247,911,912,900,915,918],{},[236,913,914],{},"Stop",[311,916,917],{},"docker compose down"," stops containers (but keeps configurations)",[247,920,921,924],{},[236,922,923],{},"Remove"," - Containers are deleted (but images remain for faster restarts)",[232,926,927],{},"Important to know:",[244,929,930,933,936,939],{},[247,931,932],{},"Stopping a container doesn't always delete it",[247,934,935],{},"Restarting is fast because the image is already downloaded",[247,937,938],{},"Any data stored inside the container (not in volumes) is lost when the container is removed",[247,940,941],{},"Your images remain on your machine until you explicitly remove them",[227,943,945],{"id":944},"common-docker-commands","Common Docker commands",[232,947,948],{},"Here are the essential commands you'll use regularly:",[610,950,952],{"className":676,"code":951,"filename":678,"language":679,"meta":10,"style":10},"# Start containers (creates if they don't exist)\ndocker compose up\n\n# Start in background (detached mode)\ndocker compose up -d\n\n# Stop and remove containers\ndocker compose down\n\n# View running containers\ndocker compose ps\n\n# View container logs\ndocker compose logs\n\n# Follow logs in real-time\ndocker compose logs -f\n\n# Execute a command in a running container\ndocker compose exec php php -v\n\n# Rebuild containers after image changes\ndocker compose up --build\n\n# Remove images to force fresh download\ndocker compose down --rmi all\n",[311,953,954,960,969,975,980,992,997,1003,1013,1018,1024,1034,1039,1045,1055,1060,1066,1079,1084,1090,1106,1111,1117,1129,1134,1140],{"__ignoreMap":10},[620,955,956],{"class":622,"line":623},[620,957,959],{"class":958},"sAwPA","# Start containers (creates if they don't exist)\n",[620,961,962,964,966],{"class":622,"line":615},[620,963,687],{"class":686},[620,965,690],{"class":652},[620,967,968],{"class":652}," up\n",[620,970,971],{"class":622,"line":643},[620,972,974],{"emptyLinePlaceholder":973},true,"\n",[620,976,977],{"class":622,"line":656},[620,978,979],{"class":958},"# Start in background (detached mode)\n",[620,981,982,984,986,989],{"class":622,"line":664},[620,983,687],{"class":686},[620,985,690],{"class":652},[620,987,988],{"class":652}," up",[620,990,991],{"class":701}," -d\n",[620,993,995],{"class":622,"line":994},6,[620,996,974],{"emptyLinePlaceholder":973},[620,998,1000],{"class":622,"line":999},7,[620,1001,1002],{"class":958},"# Stop and remove containers\n",[620,1004,1006,1008,1010],{"class":622,"line":1005},8,[620,1007,687],{"class":686},[620,1009,690],{"class":652},[620,1011,1012],{"class":652}," down\n",[620,1014,1016],{"class":622,"line":1015},9,[620,1017,974],{"emptyLinePlaceholder":973},[620,1019,1021],{"class":622,"line":1020},10,[620,1022,1023],{"class":958},"# View running containers\n",[620,1025,1027,1029,1031],{"class":622,"line":1026},11,[620,1028,687],{"class":686},[620,1030,690],{"class":652},[620,1032,1033],{"class":652}," ps\n",[620,1035,1037],{"class":622,"line":1036},12,[620,1038,974],{"emptyLinePlaceholder":973},[620,1040,1042],{"class":622,"line":1041},13,[620,1043,1044],{"class":958},"# View container logs\n",[620,1046,1048,1050,1052],{"class":622,"line":1047},14,[620,1049,687],{"class":686},[620,1051,690],{"class":652},[620,1053,1054],{"class":652}," logs\n",[620,1056,1058],{"class":622,"line":1057},15,[620,1059,974],{"emptyLinePlaceholder":973},[620,1061,1063],{"class":622,"line":1062},16,[620,1064,1065],{"class":958},"# Follow logs in real-time\n",[620,1067,1069,1071,1073,1076],{"class":622,"line":1068},17,[620,1070,687],{"class":686},[620,1072,690],{"class":652},[620,1074,1075],{"class":652}," logs",[620,1077,1078],{"class":701}," -f\n",[620,1080,1082],{"class":622,"line":1081},18,[620,1083,974],{"emptyLinePlaceholder":973},[620,1085,1087],{"class":622,"line":1086},19,[620,1088,1089],{"class":958},"# Execute a command in a running container\n",[620,1091,1093,1095,1097,1100,1102,1104],{"class":622,"line":1092},20,[620,1094,687],{"class":686},[620,1096,690],{"class":652},[620,1098,1099],{"class":652}," exec",[620,1101,696],{"class":652},[620,1103,696],{"class":652},[620,1105,702],{"class":701},[620,1107,1109],{"class":622,"line":1108},21,[620,1110,974],{"emptyLinePlaceholder":973},[620,1112,1114],{"class":622,"line":1113},22,[620,1115,1116],{"class":958},"# Rebuild containers after image changes\n",[620,1118,1120,1122,1124,1126],{"class":622,"line":1119},23,[620,1121,687],{"class":686},[620,1123,690],{"class":652},[620,1125,988],{"class":652},[620,1127,1128],{"class":701}," --build\n",[620,1130,1132],{"class":622,"line":1131},24,[620,1133,974],{"emptyLinePlaceholder":973},[620,1135,1137],{"class":622,"line":1136},25,[620,1138,1139],{"class":958},"# Remove images to force fresh download\n",[620,1141,1143,1145,1147,1150,1153],{"class":622,"line":1142},26,[620,1144,687],{"class":686},[620,1146,690],{"class":652},[620,1148,1149],{"class":652}," down",[620,1151,1152],{"class":701}," --rmi",[620,1154,1155],{"class":652}," all\n",[556,1157,1158],{},[232,1159,799,1160,1163,1164,1167,1168,1172,1173,1176],{},[311,1161,1162],{},"-f"," flag in ",[311,1165,1166],{},"docker compose logs -f"," means \"follow\" — it keeps showing new log entries as they happen. Press ",[1169,1170],"kbd",{"value":1171},"ctrl"," + ",[1169,1174],{"value":1175},"C"," to stop following.",[227,1178,1180],{"id":1179},"whats-next","What's next?",[232,1182,1183],{},"Now that you understand the fundamentals of containers, let's create your first containerized PHP project.",[1185,1186],"u-button",{"ariaLabel":1187,"className":1188,"color":1196,"label":1187,"size":1197,"to":25,"trailing-icon":1198,"variant":1199},"Create your first Docker PHP project",[1189,1190,1191,1192,1193,1194,1195],"font-bold","ring","ring-inset","ring-blue-600","text-blue-600","hover:ring-blue-500","hover:text-blue-500","primary","md","i-lucide-arrow-right","outline",[1201,1202,1203],"style",{},"html pre.shiki code .s4JwU, html code.shiki .s4JwU{--shiki-default:#85E89D}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}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 .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sAwPA, html code.shiki .sAwPA{--shiki-default:#6A737D}",{"title":10,"searchDepth":615,"depth":615,"links":1205},[1206,1207,1210,1211,1215,1221,1222,1223],{"id":229,"depth":615,"text":230},{"id":386,"depth":615,"text":387,"children":1208},[1209],{"id":401,"depth":643,"text":402},{"id":466,"depth":615,"text":467},{"id":491,"depth":615,"text":492,"children":1212},[1213,1214],{"id":505,"depth":643,"text":506},{"id":547,"depth":643,"text":548},{"id":571,"depth":615,"text":572,"children":1216},[1217,1218,1219,1220],{"id":575,"depth":643,"text":576},{"id":731,"depth":643,"text":732},{"id":795,"depth":643,"text":796},{"id":838,"depth":643,"text":839},{"id":888,"depth":615,"text":889},{"id":944,"depth":615,"text":945},{"id":1179,"depth":615,"text":1180},"Learn the basics of containers with PHP and how to use it to deploy your PHP applications.",null,{},{"title":20,"description":1224},"O8MsnD3dRayeUNMUzYmB-VsZi67Uc2kv69W4m5FFGz4",[1230,1232],{"title":18,"path":14,"stem":15,"description":1231,"children":-1},"Production-ready PHP Docker images built on official PHP. Optimized for security, performance, and developer experience.",{"title":24,"path":25,"stem":26,"description":1233,"children":-1},"Learn how to get started with serversideup/php Docker Images.",1776367053013]