0

I am new to containerD and specially to nerdctl cli so may be there's an easy way to do/debug that ? Most of the tutorial is about to run it on Linux but I am running on Windows

I created a Docker image named: image1, pushed it to Google Artifact Registry, pulled it by nerdctl - everything is OK. But when I try to actually run it I get an error:

nerdctl run -it  europe-west6-docker.pkg.dev/project/build/image1 cmd  --debug-full

error is:

time="2022-09-18T14:23:07+03:00" level=fatal msg="error parsing configuration: invalid character ':' after array element"

I am running on Windows and using Windows images in Docker containers.

Here is nerdctl inspect command:

[
    {
        "Id": "sha256:dfeccc2743d671b9582695615e6fd5e0b9bb18797ec931bbc8d50146679b37f3",
        "RepoTags": [
            "europe-west6-docker.pkg.dev/project/build/image1:latest"
        ],
        "RepoDigests": [
            "europe-west6-docker.pkg.dev/project/build/image1@sha256:11ac1c4704aa96c28c304b3b81a509e2211295087382fe37c10a8f75c1c2f3f6"
        ],
        "Comment": "",
        "Created": "2022-09-18T09:04:30.0283571Z",
        "Author": "",
        "Config": {
            "AttachStdin": false,
            "ExposedPorts": {
                "9997/tcp": {},
                "9998/tcp": {},
                "9999/tcp": {}
            },
            "Env": [
                "NODE_VERSION=16.14.1"
            ],
            "Cmd": [
                "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -command Start-Process -NoNewWindow -FilePath 'npm' -ArgumentList 'run', 'start:parse1';"
            ],
            "WorkingDir": "C:\\image1"
        },
        "Architecture": "amd64",
        "Os": "windows",
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:d6fdd6832d95a5f537e0e7d87f2613ea9741ad9c20438b9d5a2697a883c4cd96",
                "sha256:1b45f33405d020d92048301e0e63a2c5e7cc408faeba3fd7bf931e980ae36ba3",
                "sha256:39246581a1ae4c39a00bb005ab50be9640e373cf1ff3ca6065398fa4dd837703",
                "sha256:a530cfbfa1ac6ff39426ab75ab39a919fb4ca5de2af28d436fe8c39ee154c2fa",
                "sha256:f8cca1943cd8f5fa45993438d0c9b0d2eb686e4e4bad485b63c3b16c93b16e69",
                "sha256:527be45c47550e9d6dd7f2b36a28ae25794523ca915a9ebd8445c9c463eaf034",
                "sha256:4565236123b2abdc4f87f0eb03b3ad92a51dc3d1437db79b45261178b8cd7b31",
                "sha256:f8a03c5f20c54a596754bcdbd9882fa1540cbc627ad484888b554e3a78905e45",
                "sha256:a5b070a25e50ff7f67bba1a12f9dee00bb56f1967f8b82d53323bbc2ee9671ec",
                "sha256:938c1ecb24476120bab6bbb263b0e3e8e667cc1ffd3dc906ed6ebf1fd55f894c",
                "sha256:8b89aca5a6000dd0880a78763f424000242ad5db7ea1daf1cf0f5770cd2a5888",
                "sha256:6ef91cca0e7c2f0faf36daf27da25b1361d6e8c42254ee9aaac096e6b5fe2a47",
                "sha256:9febc969f24df33757baa2761079efea9c3006e55d298554d20b52fb22c41137"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

and here is Docker image:

# escape=`
FROM mcr.microsoft.com/windows/servercore:ltsc2019-amd64

SHELL ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]

# Setting Windows culture will set time presentation to 24 format, short time presentation, etc...
RUN Set-Culture he-IL

# Install Nodejs
ENV NODE_VERSION 16.14.1

RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing; `
    Expand-Archive node.zip -DestinationPath 'C:\' ; `
    Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'; `
    Remove-Item node.zip; `
    $env:PATH = 'C:\nodejs;' -f $env:PATH ; `
    [Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine);

WORKDIR /image1

# Copy whole folder because some 3rd party binaries are used
COPY . .

EXPOSE 9999
EXPOSE 9998
EXPOSE 9997

ENTRYPOINT [ ]

CMD Start-Process -NoNewWindow -FilePath 'npm' -ArgumentList 'run', 'start:parse1';
Alex F
  • 3,180
  • 2
  • 28
  • 40

0 Answers0