Make WordPress Core

Opened 9 months ago

Last modified 3 months ago

#63883 new enhancement

Podman Local Environment Setup Scripts

Reported by: andrewkarch's profile andrewkarch Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.9
Component: Build/Test Tools Keywords: 2nd-opinion reporter-feedback
Focuses: Cc:

Description

Due to a restriction, Docker is cannot be installed on my Mac and Podman must be used.

The instructions for getting the local environment set up require the use of docker, https://github.com/WordPress/wordpress-develop/?tab=readme-ov-file#local-development.

We can add support for Podman via an argument would be helpful in the case that docker cannot be installed.

/tools/local-env/scripts/docker.js

Output:

WordPress@6.9.0 env:start
node ./tools/local-env/scripts/start.js && node ./tools/local-env/scripts/docker.js run -T --rm php composer update -W

/bin/sh: docker: command not found
/Users/<User>/wordpress-develop/tools/local-env/scripts/start.js:26

throw new Error( 'Could not retrieve Docker system info. Is the Docker service running?' );

Error: Could not retrieve Docker system info. Is the Docker service running?

at Object.<anonymous> (/Users/<User>/wordpress-develop/tools/local-env/scripts/start.js:26:9)
at Module._compile (node:internal/modules/cjs/loader:1469:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
at Module.load (node:internal/modules/cjs/loader:1288:32)
at Module._load (node:internal/modules/cjs/loader:1104:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49

Node.js v20.17.0

Change History (3)

#1 @desrosj
5 months ago

  • Keywords 2nd-opinion added

Hi @andrewkarch,

Welcome to Trac!

In [60504]/#63641, a note was added tot he README mentioning that Podman should work without issue, but only Docker is currently supported:

Note: WordPress currently only officially supports Docker but several container environments are available and should generally be compatible, such as Colima, OrbStack, Podman Desktop, and Rancher Desktop.

I believe that something like this would fix this issue:

execSync( `${containerTool} info` );

But I am not sure that I love this because it opens the door for some unknown use cases in the future that may prevent certain changes.

@johnbillion do you have any thoughts here?

Last edited 5 months ago by desrosj (previous) (diff)

#2 follow-up: @johnbillion
5 months ago

I use OrbStack at the moment and it ships with Docker command-line tools so docker on the CLI continues to work (just using OrbStack as its context).

It looks like Podman doesn't do this, and uses its own podman command instead. If you create a docker alias that points to podman does everything work ok?

My concern with adding support for commands other than docker is it starts to look like official support.

#3 in reply to: ↑ 2 @desrosj
3 months ago

  • Keywords reporter-feedback added

Replying to johnbillion:

It looks like Podman doesn't do this, and uses its own podman command instead. If you create a docker alias that points to podman does everything work ok?

@andrewkarch are you able to test this out?

Note: See TracTickets for help on using tickets.