a) check docker ps table to see if "mchef-proxy" is running on 80 (mchef-proxy is the name of the container, not the image name)
dba15ce67832 nginx:alpine "/docker-entrypoint.…" 4 months ago Up 4 days 0.0.0.0:80->80/tcp, [::]:80->80/tcp mchef-proxy
RETURN EARLY IF MCHEF-PROXY IS RUNNING ON 80
b) Check to see if port 80 is being used by something else. Note - we will probably need different code for osx, linux and windows to do this check. If something is running on port 80, warn that mchef proxy mode will not work.
This check should be applied in the following places
- When configuring mchef to run in proxy mode (mchef config -p / mchef config --proxy)
- When upping an instance via mchef up command
- When creating a new instance via a recipe <- also note that when in proxy mode it should warn that the recipe port (if present) will be ignored.
Proxy service methods that should be used for this:
ProxyService->isProxyModeEnabled <- if not enabled then no warning
ProxyService->sProxyContainerRunning <- if running, no warning
To start proxy service
ProxyService->ensureProxyRunning
a) check docker ps table to see if "mchef-proxy" is running on 80 (mchef-proxy is the name of the container, not the image name)
dba15ce67832 nginx:alpine "/docker-entrypoint.…" 4 months ago Up 4 days 0.0.0.0:80->80/tcp, [::]:80->80/tcp mchef-proxy
RETURN EARLY IF MCHEF-PROXY IS RUNNING ON 80
b) Check to see if port 80 is being used by something else. Note - we will probably need different code for osx, linux and windows to do this check. If something is running on port 80, warn that mchef proxy mode will not work.
This check should be applied in the following places
Proxy service methods that should be used for this:
ProxyService->isProxyModeEnabled <- if not enabled then no warning
ProxyService->sProxyContainerRunning <- if running, no warning
To start proxy service
ProxyService->ensureProxyRunning