DEV Community

Sidgley de Almeida Guedes
Sidgley de Almeida Guedes

Posted on

2

How to create a temporary PHP container for test

Requeriments

  • Must have docker installed.

You can use the following tutorial to install docker

How to install docker on Ubuntu

Open terminal and type de following code

docker run --rm -it php:8.1 /bin/bash

Or, if you would like to move files into the container use:

docker run --rm -it -v /origin_path_name/file_name.extension:/destination_path_name/file_name.extension php:8.1 /bin/bash

After that, you can find your file and execute it by typing:

php file_name

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay