containerd / containerd/nerdctl
docker compose compatibility - use current shell env for variable substitution in docker-compose.yaml
- Dominant language
- Go
- Stars
- 10.4k
- Forks
- 826
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 44
Description
### Description
docker compose will do env var substitutions based on the current shell env. To ensure compatibility we need to allow this behavior in nerdctl as well.
### Steps to reproduce the issue
1. Have an env var set in your current shell env.
2. Reference this env var name in your docker-compose.yaml file
3. Run nerdctl up and you'll see the env var is not substituted
### Describe the results you received and expected
The env var was marked as not found, we expect it to be present based on the existence in the env alone.
e.g. a message like this is received indicating it's not there:
```
WARN[0000] The "POETRY_HTTP_BASIC_SHIPT_RESOLVE_PASSWORD" variable is not set. Defaulting to a blank string.
```
but the env var is set in the current shell env.
The expectation is that the current shell env can be consulted for substitution candidates.
### What version of nerdctl are you using?
Rancher desktop 1.4.1, nerdctl 0.20.0
### Are you using a variant of nerdctl? (e.g., Rancher Desktop)
Rancher Desktop for macOS
### Host information
```
Client:
Namespace: default
Debug Mode: false
Server:
Server Version: v1.5.11
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Log: json-file
Storage: native overlayfs
Security Options:
seccomp
Profile: default
Kernel Version: 5.15.40-0-virt
Operating System: Alpine Linux v3.15
OSType: linux
Architecture: aarch64
CPUs: 2
Total Memory: 1.931GiB
Name: lima-rancher-desktop
ID: a5e68671-7f2d-473c-97f3-4de8042f672e
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.