for-mac icon indicating copy to clipboard operation
for-mac copied to clipboard

docker import using --change value with double quotes throws `bare " in non-quoted-field` error

Open jfriv opened this issue 10 years ago • 2 comments

Expected behavior

Running docker import with a --change value which contains double quotes will run without error.

Actual behavior

Running the following command:

docker import --change 'ENTRYPOINT ["/entrypoint.sh"]' --change 'EXPOSE 80' --change 'CMD ["runapp"]' test_export_2016-08-03.tar test_export:2016-08-03`

throws this error:

invalid argument "ENTRYPOINT [\"/entrypoint.sh\"]" for --change: line 1, column 12: bare " in non-quoted-field

Information

Diagnostic ID: 9D9E1167-92B4-4F12-B154-9EA73D37201F Docker for Mac: 1.12.0-beta21 (Build 10868) macOS: Version 10.11.6 (Build 15G31) [OK] docker-cli [OK] app [OK] moby-syslog [OK] disk [OK] virtualization [OK] system [OK] menubar [OK] osxfs [OK] db [OK] slirp [OK] moby-console [OK] logs [OK] vmnetd [OK] env [OK] moby [OK] driver.amd64-linux

Steps to reproduce

  1. Export a container into a tar file or pipe to STDOUT
  2. Import the exported tar file (or STDIN) with a --change value which contains a double quote
  3. Produces error bare " in non-quoted-field

jfriv avatar Aug 03 '16 16:08 jfriv

I can reproduce this even on Linux. If it is a bug (it certainly looks like one), it is likely an issue with docker/docker. Until we have our multi-GitHub issue tracker workflow sorted out, I recommend re-filing the issue there. Thanks for the report and sorry for the inconvenience.

dsheets avatar Aug 04 '16 11:08 dsheets

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jun 18 '20 03:06 docker-robott