Sign inSign up

alnoda/php-workspace

By alnoda

•Updated about 3 years ago

Containerized isolated development environment for PHP programming language.

Image
0

691

alnoda/php-workspace repository overview

⁠PHP workspace

Containerized isolated development environment for PHP programming language.
Includes PHP, Composer, code editor, terminal, filebrowser and git manager.

⁠Start

docker run --name space-1 -d -p 8020-8040:8020-8040 --restart=always alnoda/php-workspace

open localhost:8020⁠ in browser.

⁠Features

Alnoda docs⁠
Alnoda Hub⁠

⁠PHP Hello World

Check PHP version

php -v

Open IDE and create file hello.php with the following content

<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 </body>
</html>

Start server in terminal

cd /home/project
php -S 127.0.0.1:8026

Open Quickstart page, go to "My apps" and use port 8026 shortcut to open your web app

⁠Website example

Clone GitHub repo with a PHP website, for example

git clone https://github.com/banago/simple-php-website.git

Server with PHP development server

cd simple-php-website
php -S 0.0.0.0:8026

Open Quickstart page, go to "My apps" and use port 8026 shortcut to open your web app

⁠Composer

Install package with Composer

composer require phpunit/php-timer

⁠PHPBrew⁠

To list known versions:

phpbrew known

Simply build and install PHP with default variant:

phpbrew install 5.4.0 +default

Use (switch version temporarily):

phpbrew use 5.4.22

Switch PHP version (switch default version)

phpbrew switch 5.4.18

Tag summary

Content type

Image

Digest

sha256:fb2cc4a88…

Size

980.3 MB

Last updated

about 3 years ago

docker pull alnoda/php-workspace