---
title: "Introducing php-contenv: Ready-to-Go Docker Environment for PHP Projects with different php versions and servers"
url: https://daily.dev/posts/introducing-php-contenv-ready-to-go-docker-environment-for-php-projects-with-different-php-versions-uxour5c5j
source_url: https://daily.dev/posts/introducing-php-contenv-ready-to-go-docker-environment-for-php-projects-with-different-php-versions-uxour5c5j
type: freeform
source: "Laravel Dev"
author: "Mani"
published: 2025-05-17T14:48:33.827Z
updated: 2025-05-17T14:48:43.402Z
tags: ["open-source", "docker", "php", "laravel"]
reading_time: 2
upvotes: 32
comments: 10
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Introducing php-contenv: Ready-to-Go Docker Environment for PHP Projects with different php versions and servers

**[Laravel Dev](https://daily.dev/sources/laraveldev)** · [@mani404](https://daily.dev/mani404) · 2 min read · 32 upvotes · 10 comments

## Summary

Php-contenv is a simple project offering pre-configured Docker environments for PHP projects, supporting various PHP versions and web servers. It simplifies development by bundling Composer, Node.js, and essential tools, while enabling easy integration via Git submodules and consistent environments for team collaboration.

## Content

Hey #PHP and #Laravel developers!

I would like to share a simple and small project I've been working on: php-contenv - a simple PHP Container Environment for Development. Inspired from Sail.

Setting up consistent and isolated local development environments for PHP projects can often be a hassle. You need specific PHP versions, Composer, Node.js, various extensions, and sometimes different web servers. Managing these dependencies across multiple projects or team members can become complicated.

`php-contenv` aims to solve this by providing pre-configured Docker environments that you can easily integrate into any PHP project using Git submodules. This means you don't need to install PHP, Composer, or Node.js directly on your machine.

Key benefits:

Ready-to-Go: Get up and running quickly with pre-configured Dockerfiles for different PHP versions (8.1-8.4) and web servers (Apache, Nginx).

Includes Essential Tools: Comes bundled with Composer, Node.js (via NVM), Xdebug, common image processing libraries, and database clients.

Easy Integration: Add it as a Git submodule (git submodule add ...) and run a simple setup script (./.docker/docky setup).

Live Updates: Benefit from live code and configuration changes via Docker volumes without needing to rebuild images constantly.

Consistent Environments: Ensure everyone on your team is working in the same environment, reducing "it works on my machine" issues.

Whether you're starting a new Laravel project or want to containerize an existing one, php-contenv can help.

I've put together a README with detailed instructions on how to get started and use the environment for common tasks like running Artisan or Composer commands.

Check out the repository here: [Repo](https://github.com/techgonia-devjio/php-contenv)

I'm also actively looking for feedback and contributions! Feel free to open issues, suggest improvements, or submit pull requests.

Let me know what you think!

#docker #php #laravel #development #opensource

## Community discussion

Top comments from developers on daily.dev.

**@sam7work** · 2 upvotes

> my immediate concern is, you are downloading a https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh which is fine, but
>
> a: this is a shallscript you are downloading and running inside your docker container without even checking for checksum.
>
> b: i can't see what it does because it is rate limited somehow ... so yeah
>
> i will check again after you make it possible to see that script :-) cause at this moment , i can't be sure what it does

**@brunoc** · 2 upvotes

> Similar to
> https://serversideup.net/open-source/docker-php/

**@sam7work** · 1 upvotes

> now i was able to see the script, you are installing node , wow , at least i assume you are installing node

**@palalet** · 1 upvotes

> Why is node there when we are speaking about php containers?

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#open-source](https://daily.dev/tags/open-source), [#docker](https://daily.dev/tags/docker), [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel)

[View this post on daily.dev](https://daily.dev/posts/introducing-php-contenv-ready-to-go-docker-environment-for-php-projects-with-different-php-versions-uxour5c5j)
