Skip to content

Docker ARG parsing doesn't work #455

Open
@twsl

Description

@twsl

Similar to my previous issue #78, ARG parsing is still causing issues.

Using:

docker run -it --rm -v /tmp/envbuilder:/workspaces -e ENVBUILDER_GIT_URL=https://github.com/twsl/whos-there -e ENVBUILDER_INIT_SCRIPT=bash ghcr.io/coder/envbuilder

I get the following error message:

No Dockerfile specified, looking for a devcontainer.json...
Building in Devcontainer mode using /.devcontainer/devcontainer.json
error: compile devcontainer.json: user from dockerfile: parse image ref "mcr.microsoft.com/devcontainers/python:1-${VARIANT}": could not parse reference: mcr.microsoft.com/devcontainers/python:1-${VARIANT}
error: running command "envbuilder": compile devcontainer.json: user from dockerfile: parse image ref "mcr.microsoft.com/devcontainers/python:1-${VARIANT}": could not parse reference: mcr.microsoft.com/devcontainers/python:1-${VARIANT}

The ARG is specified in the devcontainer.json and has a default value in the Dockerfile.

"build": {
        "dockerfile": "Dockerfile",
        "context": "..",
        "args": {
            "VARIANT": "3.11-bookworm"
        }
    },

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions