https://rancher.com/ logo
Title
h

helpful-butcher-75556

10/17/2022, 1:38 PM
I see differences in the way environment variables are injected depending on if
nerdctl run
is used vs
nerdctl compose up
with an
env-file
is used. This is on RD 1.6.0 Mac M1 If you have this in a
.env
file:
ZZ='.env file $test pound # and more'
ZZ_NOQUOTES=.env file $test pound # and more
nerdctl run --rm --env-file ./.env  busybox /bin/sh -c set
# looks like it adds single quotes
ZZ=''"'"'.env file $test pound # and more'"'"
ZZ_NOQUOTES='.env file $test pound # and more'
But if you you
nerdctl compose up
and use that file the single quotes work as the spec says they should (truncating the second value since # is a comment)
ZZ='.env file $test pound # and more'
ZZ_NOQUOTES='.env file  pound'
The compose file:
services:
  busybox:
    image: busybox
    env_file:
      - .env
    command: ['sh', '-c', 'set']
f

fast-garage-66093

10/17/2022, 4:09 PM
Could you file a bug at Issues · containerd/nerdctl, as I expect this to be an issue inside
nerdctl
and not Rancher Desktop?
👍 1