[{"data":1,"prerenderedAt":456},["Reactive",2],{"content-query-639TNrbtJ3":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"head":10,"layout":12,"body":13,"_type":451,"_id":452,"_source":453,"_file":454,"_extension":455},"/docs/reference/command-reference","reference",false,"","Command Reference","Learn about all the commands available within the serversideup/php image to improve your developer experience.",{"title":11},"Command reference - Docker PHP - Server Side Up","docs",{"type":14,"children":15,"toc":440},"root",[16,24,51,67,74,90,95,100,142,147,152,182,187,200,205,210,242,247,252,261,307,312,325,332,368,373,378,383,396,406,411,434],{"type":17,"tag":18,"props":19,"children":21},"element","h1",{"id":20},"command-reference",[22],{"type":23,"value":8},"text",{"type":17,"tag":25,"props":26,"children":27},"lead-p",{},[28],{"type":17,"tag":29,"props":30,"children":31},"p",{},[32,34,41,43,49],{"type":23,"value":33},"We included a few commands in the ",{"type":17,"tag":35,"props":36,"children":38},"code",{"className":37},[],[39],{"type":23,"value":40},"/usr/local/bin",{"type":23,"value":42}," directory to help you with your development experience. These commands are available in the ",{"type":17,"tag":35,"props":44,"children":46},{"className":45},[],[47],{"type":23,"value":48},"serversideup/php",{"type":23,"value":50}," image.",{"type":17,"tag":52,"props":53,"children":54},"note",{},[55],{"type":17,"tag":29,"props":56,"children":57},{},[58,60,65],{"type":23,"value":59},"Since our images are unprivileged by default, you'll need to switch to the ",{"type":17,"tag":35,"props":61,"children":63},{"className":62},[],[64],{"type":23,"value":14},{"type":23,"value":66}," user to run these commands. This is a security feature that ensures that your container is as secure as possible.",{"type":17,"tag":68,"props":69,"children":71},"h2",{"id":70},"official-php-docker-commands",[72],{"type":23,"value":73},"Official PHP Docker Commands",{"type":17,"tag":29,"props":75,"children":76},{},[77,79,88],{"type":23,"value":78},"Since our images are based off the official PHP Docker images, any commands from the Official PHP Docker images are available in our images. You can find the full list of commands on the ",{"type":17,"tag":80,"props":81,"children":85},"a",{"href":82,"rel":83},"https://hub.docker.com/_/php",[84],"nofollow",[86],{"type":23,"value":87},"official PHP Docker images documentation",{"type":23,"value":89},".",{"type":17,"tag":68,"props":91,"children":93},{"id":92},"docker-php-serversideup-dep-install-alpine",[94],{"type":23,"value":92},{"type":17,"tag":29,"props":96,"children":97},{},[98],{"type":23,"value":99},"This command will detect the operating system and install packages if it is an Alpine based system. This is helpful if you're building multiple operating systems from the same Dockerfile.",{"type":17,"tag":101,"props":102,"children":104},"code-panel",{"label":103},"Example - Installing the `git` package on Alpine",[105],{"type":17,"tag":106,"props":107,"children":111},"pre",{"className":108,"code":109,"language":110,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark github-dark monokai","# Usage: docker-php-serversideup-dep-install-alpine [alpine-packages]\ndocker-php-serversideup-dep-install-alpine git\n","bash",[112],{"type":17,"tag":35,"props":113,"children":114},{"__ignoreMap":7},[115,127],{"type":17,"tag":116,"props":117,"children":120},"span",{"class":118,"line":119},"line",1,[121],{"type":17,"tag":116,"props":122,"children":124},{"style":123},"--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F",[125],{"type":23,"value":126},"# Usage: docker-php-serversideup-dep-install-alpine [alpine-packages]\n",{"type":17,"tag":116,"props":128,"children":130},{"class":118,"line":129},2,[131,136],{"type":17,"tag":116,"props":132,"children":134},{"style":133},"--shiki-default:#B392F0;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E",[135],{"type":23,"value":92},{"type":17,"tag":116,"props":137,"children":139},{"style":138},"--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF;--shiki-sepia:#E6DB74",[140],{"type":23,"value":141}," git\n",{"type":17,"tag":68,"props":143,"children":145},{"id":144},"docker-php-serversideup-dep-install-debian",[146],{"type":23,"value":144},{"type":17,"tag":29,"props":148,"children":149},{},[150],{"type":23,"value":151},"This command will detect the operating system and install packages if it is a Debian based system. This is helpful if you're building multiple operating systems from the same Dockerfile.",{"type":17,"tag":101,"props":153,"children":155},{"label":154},"Example - Installing the `git` package on Debian",[156],{"type":17,"tag":106,"props":157,"children":159},{"className":108,"code":158,"language":110,"meta":7,"style":7},"# Usage: docker-php-serversideup-dep-install-debian [debian-packages]\ndocker-php-serversideup-dep-install-debian git\n",[160],{"type":17,"tag":35,"props":161,"children":162},{"__ignoreMap":7},[163,171],{"type":17,"tag":116,"props":164,"children":165},{"class":118,"line":119},[166],{"type":17,"tag":116,"props":167,"children":168},{"style":123},[169],{"type":23,"value":170},"# Usage: docker-php-serversideup-dep-install-debian [debian-packages]\n",{"type":17,"tag":116,"props":172,"children":173},{"class":118,"line":129},[174,178],{"type":17,"tag":116,"props":175,"children":176},{"style":133},[177],{"type":23,"value":144},{"type":17,"tag":116,"props":179,"children":180},{"style":138},[181],{"type":23,"value":141},{"type":17,"tag":68,"props":183,"children":185},{"id":184},"docker-php-serversideup-entrypoint",[186],{"type":23,"value":184},{"type":17,"tag":29,"props":188,"children":189},{},[190,192,198],{"type":23,"value":191},"For our images that ",{"type":17,"tag":193,"props":194,"children":195},"strong",{},[196],{"type":23,"value":197},"DO NOT use S6 Overlay",{"type":23,"value":199},", this is our default entrypoint script.",{"type":17,"tag":68,"props":201,"children":203},{"id":202},"docker-php-serversideup-install-php-ext-installer",[204],{"type":23,"value":202},{"type":17,"tag":29,"props":206,"children":207},{},[208],{"type":23,"value":209},"This is an internal helper script to shorten up the syntax for the installation of the PHP extension installer.",{"type":17,"tag":101,"props":211,"children":213},{"label":212},"Example - Installing the PHP extension installer",[214],{"type":17,"tag":106,"props":215,"children":217},{"className":108,"code":216,"language":110,"meta":7,"style":7},"# Usage: docker-php-serversideup-install-php-ext-installer [version]\ndocker-php-serversideup-install-php-ext-installer 2.2.0\n",[218],{"type":17,"tag":35,"props":219,"children":220},{"__ignoreMap":7},[221,229],{"type":17,"tag":116,"props":222,"children":223},{"class":118,"line":119},[224],{"type":17,"tag":116,"props":225,"children":226},{"style":123},[227],{"type":23,"value":228},"# Usage: docker-php-serversideup-install-php-ext-installer [version]\n",{"type":17,"tag":116,"props":230,"children":231},{"class":118,"line":129},[232,236],{"type":17,"tag":116,"props":233,"children":234},{"style":133},[235],{"type":23,"value":202},{"type":17,"tag":116,"props":237,"children":239},{"style":238},"--shiki-default:#79B8FF;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF",[240],{"type":23,"value":241}," 2.2.0\n",{"type":17,"tag":68,"props":243,"children":245},{"id":244},"docker-php-serversideup-set-file-permissions",[246],{"type":23,"value":244},{"type":17,"tag":29,"props":248,"children":249},{},[250],{"type":23,"value":251},"This command is used to set the file permissions of a service in the container. This is useful for development environments where you want to match the user and group ID of the host machine.",{"type":17,"tag":29,"props":253,"children":254},{},[255],{"type":17,"tag":80,"props":256,"children":258},{"href":257},"/docs/guide/understanding-file-permissions",[259],{"type":23,"value":260},"Learn more about working with file permissions →",{"type":17,"tag":101,"props":262,"children":264},{"label":263},"Example - Setting the file permissions of the NGINX service",[265],{"type":17,"tag":106,"props":266,"children":268},{"className":108,"code":267,"language":110,"meta":7,"style":7},"# Usage: docker-php-serversideup-set-file-permissions --owner USER:GROUP --service SERVICE\ndocker-php-serversideup-set-file-permissions --owner 1000:1000 --service nginx\n",[269],{"type":17,"tag":35,"props":270,"children":271},{"__ignoreMap":7},[272,280],{"type":17,"tag":116,"props":273,"children":274},{"class":118,"line":119},[275],{"type":17,"tag":116,"props":276,"children":277},{"style":123},[278],{"type":23,"value":279},"# Usage: docker-php-serversideup-set-file-permissions --owner USER:GROUP --service SERVICE\n",{"type":17,"tag":116,"props":281,"children":282},{"class":118,"line":129},[283,287,292,297,302],{"type":17,"tag":116,"props":284,"children":285},{"style":133},[286],{"type":23,"value":244},{"type":17,"tag":116,"props":288,"children":289},{"style":238},[290],{"type":23,"value":291}," --owner",{"type":17,"tag":116,"props":293,"children":294},{"style":138},[295],{"type":23,"value":296}," 1000:1000",{"type":17,"tag":116,"props":298,"children":299},{"style":238},[300],{"type":23,"value":301}," --service",{"type":17,"tag":116,"props":303,"children":304},{"style":138},[305],{"type":23,"value":306}," nginx\n",{"type":17,"tag":68,"props":308,"children":310},{"id":309},"docker-php-serversideup-set-id",[311],{"type":23,"value":309},{"type":17,"tag":29,"props":313,"children":314},{},[315,317,323],{"type":23,"value":316},"This command is used to set the user and group ID of the ",{"type":17,"tag":35,"props":318,"children":320},{"className":319},[],[321],{"type":23,"value":322},"www-data",{"type":23,"value":324}," user in the container. This is useful for development environments where you want to match the user and group ID of the host machine.",{"type":17,"tag":29,"props":326,"children":327},{},[328],{"type":17,"tag":80,"props":329,"children":330},{"href":257},[331],{"type":23,"value":260},{"type":17,"tag":101,"props":333,"children":335},{"label":334},"Example - Setting the user and group ID of the `www-data` user",[336],{"type":17,"tag":106,"props":337,"children":339},{"className":108,"code":338,"language":110,"meta":7,"style":7},"#  docker-php-serversideup-set-id [username] [uid]:[gid]\ndocker-php-serversideup-set-id www-data 1000:1000\n",[340],{"type":17,"tag":35,"props":341,"children":342},{"__ignoreMap":7},[343,351],{"type":17,"tag":116,"props":344,"children":345},{"class":118,"line":119},[346],{"type":17,"tag":116,"props":347,"children":348},{"style":123},[349],{"type":23,"value":350},"#  docker-php-serversideup-set-id [username] [uid]:[gid]\n",{"type":17,"tag":116,"props":352,"children":353},{"class":118,"line":129},[354,358,363],{"type":17,"tag":116,"props":355,"children":356},{"style":133},[357],{"type":23,"value":309},{"type":17,"tag":116,"props":359,"children":360},{"style":138},[361],{"type":23,"value":362}," www-data",{"type":17,"tag":116,"props":364,"children":365},{"style":138},[366],{"type":23,"value":367}," 1000:1000\n",{"type":17,"tag":68,"props":369,"children":371},{"id":370},"docker-php-serversideup-s6-install",[372],{"type":23,"value":370},{"type":17,"tag":29,"props":374,"children":375},{},[376],{"type":23,"value":377},"This is a command used at build time to install a specific version of S6 Overlay.",{"type":17,"tag":68,"props":379,"children":381},{"id":380},"install-php-extensions",[382],{"type":23,"value":380},{"type":17,"tag":29,"props":384,"children":385},{},[386,388,394],{"type":23,"value":387},"This command is a wrapper around the ",{"type":17,"tag":35,"props":389,"children":391},{"className":390},[],[392],{"type":23,"value":393},"docker-php-ext-install",{"type":23,"value":395}," command that comes with the official PHP Docker images. This command allows you to install PHP extensions with a single command.",{"type":17,"tag":29,"props":397,"children":398},{},[399],{"type":17,"tag":80,"props":400,"children":403},{"href":401,"rel":402},"https://github.com/mlocati/docker-php-extension-installer",[84],[404],{"type":23,"value":405},"Check out the docker-php-extension-installer project on GitHub →",{"type":17,"tag":29,"props":407,"children":408},{},[409],{"type":23,"value":410},"Here's an example of how you can use this command:",{"type":17,"tag":101,"props":412,"children":414},{"label":413},"Example - Installing the \"intl\" extension",[415],{"type":17,"tag":106,"props":416,"children":418},{"className":108,"code":417,"language":110,"meta":7,"style":7},"install-php-extensions intl\n",[419],{"type":17,"tag":35,"props":420,"children":421},{"__ignoreMap":7},[422],{"type":17,"tag":116,"props":423,"children":424},{"class":118,"line":119},[425,429],{"type":17,"tag":116,"props":426,"children":427},{"style":133},[428],{"type":23,"value":380},{"type":17,"tag":116,"props":430,"children":431},{"style":138},[432],{"type":23,"value":433}," intl\n",{"type":17,"tag":435,"props":436,"children":437},"style",{},[438],{"type":23,"value":439},"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 .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":7,"searchDepth":129,"depth":129,"links":441},[442,443,444,445,446,447,448,449,450],{"id":70,"depth":129,"text":73},{"id":92,"depth":129,"text":92},{"id":144,"depth":129,"text":144},{"id":184,"depth":129,"text":184},{"id":202,"depth":129,"text":202},{"id":244,"depth":129,"text":244},{"id":309,"depth":129,"text":309},{"id":370,"depth":129,"text":370},{"id":380,"depth":129,"text":380},"markdown","content:docs:7.reference:2.command-reference.md","content","docs/7.reference/2.command-reference.md","md",1727367946711]