Yes, it's "docker load" instead of "docker import" The escaping thing is due to jshon trying to support generating JSON which can be inserted into a <script> tag. It adds a backslash so that it never generates the string "</script>"
On 26/09/2016, Michael Fellinger <[email protected]> wrote: > Try using 'docker load -i' instead > > On Sun, Sep 25, 2016, 13:44 Tomasz Czyż <[email protected]> wrote: > >> Hi, >> >> I'm preparing docker image using dockerTools.buildImage with >> >> x = pkgs.dockerTools.buildImage {name="myimage";· >> >> contents = [dumb-init ]; >> >> config={ >> >> WorkingDir = "/"; >> >> }; >> >> }; >> >> After the image is ready I do >> >> docker import /nix/store/xxxxxx.tar.gz myimage >> and I have the image imported but >> >> docker inspect myimage >> >> "Config": { >> "Hostname": "", >> "Domainname": "", >> "User": "", >> "AttachStdin": false, >> "AttachStdout": false, >> "AttachStderr": false, >> "Tty": false, >> "OpenStdin": false, >> "StdinOnce": false, >> "Env": null, >> "Cmd": null, >> "Image": "", >> "Volumes": null, >> "WorkingDir": "", >> "Entrypoint": null, >> "OnBuild": null, >> "Labels": null >> }, >> >> inside the tar file I have the config like: >> >> { >> "architecture": "amd64", >> "config": { >> "WorkingDir": "\/" >> }, >> "created": "1970-01-01T00:00:01Z", >> "os": "linux", >> "checksum": >> "tarsum.v1+sha256:41988742f842b9214b599674ccc7d3da9a0df5336276657cec1a9eabf1c297ef", >> "id": >> "9edfe86ac62fc829c5a122778565e3af12ce720dd64ca6547c6664e671996c63", >> "Size": 22067200 >> } >> >> So as you can see, the json config is generated inside docker image, but >> docker does not import that settings. Also it looks like it's escaped but >> it should not be right? >> >> Does anyone knows how to do it properly or tell how I could fix it? >> _______________________________________________ >> nix-dev mailing list >> [email protected] >> http://lists.science.uu.nl/mailman/listinfo/nix-dev >> > _______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
