Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WSL compatibility #23

Open
pseudotuga opened this issue Dec 18, 2024 · 0 comments
Open

WSL compatibility #23

pseudotuga opened this issue Dec 18, 2024 · 0 comments

Comments

@pseudotuga
Copy link

I'm using this script with success in an Unix environment but when I try it under WSL it simply didn't work.

> docker tag alpine:latest my_image:my_version
> python3 docker-copyedit.py from alpine:latest into my_image:my_version -vv set label author "real me"
WARNING:edit:output image is local (None)
INFO:edit:new load.tmp/data from docker save
WARNING:edit:done  new label 'author' real me
/home/tiago/workspace/docker-copyedit/docker-copyedit.py:715: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
  "created": datetime.datetime.utcnow().isoformat() + "Z"}]
INFO:edit:written new load.tmp/data/89fc417ed17a06fbdaecdd1558d7e80e90872211b1e9279370631b3c03489cdf.json
INFO:edit:removed old load.tmp/data/blobs/sha256/4048db5d36726e313ab8f7ffccf2362a34cba69e4cdd49119713483a68641fce

> docker inspect my_image:my_version | grep Label
            "Labels": null
> docker inspect my_image:my_version
[
    {
        "Id": "sha256:21dc6063fd678b478f57c0e13f47560d0ea4eeba26dfc947b2a4f81f686b9f45",
        "RepoTags": [
            "alpine:latest",
            "my_image:my_version"
        ],
        "RepoDigests": [
            "alpine@sha256:21dc6063fd678b478f57c0e13f47560d0ea4eeba26dfc947b2a4f81f686b9f45",
            "cebolas@sha256:21dc6063fd678b478f57c0e13f47560d0ea4eeba26dfc947b2a4f81f686b9f45"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-12-05T12:49:04Z",
        "DockerVersion": "27.2.0",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh"
            ],
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 3655264,
        "GraphDriver": {
            "Data": null,
            "Name": "overlayfs"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:3e01818d79cd3467f1d60e54224f3f6ce5170eceb54e265d96bb82344b8c24e7"
            ]
        },
        "Metadata": {
            "LastTagTime": "2024-12-17T18:41:42.594909552Z"
        }
    }
]

On unix:

❯ docker inspect my_image:my_version
[
    {
        "Id": "sha256:54c82cff525076567cee212a52c25d99bcd7b805006f9adfaa978fde7abfe6b1",
        "RepoTags": [
            "my_image:my_version"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "",
        "Created": "2024-12-05T12:49:04Z",
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
            ],
            "Cmd": [
                "/bin/sh"
            ],
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": {
                "author": "real me"
            }
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 7832877,
        "GraphDriver": {
            "Data": {
                "MergedDir": "/var/lib/docker/overlay2/d093280b7c760191d2ee7ca46fe9f69a46188c648b0c6a31a2b483cf16630955/merged",
                "UpperDir": "/var/lib/docker/overlay2/d093280b7c760191d2ee7ca46fe9f69a46188c648b0c6a31a2b483cf16630955/diff",
                "WorkDir": "/var/lib/docker/overlay2/d093280b7c760191d2ee7ca46fe9f69a46188c648b0c6a31a2b483cf16630955/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:3e01818d79cd3467f1d60e54224f3f6ce5170eceb54e265d96bb82344b8c24e7"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant