Skip to content

[BUG] Docker run to compose converter has trouble with environment variables #838

Open
@Steltek

Description

@Steltek

Which tool is impacted?
Docker run to Docker compose converter

To Reproduce
Steps to reproduce the behavior:

  1. Open the converter.
  2. Paste this example:
docker run --detach \
  --env DOWNLOADER="your name" \
  --env SELECTED_PROJECT="auto" \
  --name archiveteam-warrior \
  --label=com.centurylinklabs.watchtower.enable=true \
  --restart=on-failure \
  --publish 8002:8001 \
  atdr.meo.ws/archiveteam/warrior-dockerfile

from https://github.com/ArchiveTeam/warrior-dockerfile

The resulting output is this:

version: '3.9'
services:
    your:
        command: 'name" \'
        image: your
        environment:
            - DOWNLOADER=

(The "your name" from the --env environment variable somehow got injected into the service tag, command, and image, and the rest of the original docker command is missing entirely.)

Expected behavior

Compose output should be like this:

version: '3.9'
services:
    archiveteam:
        image: atdr.meo.ws/archiveteam/warrior-dockerfile
        ports:
            - '8002:8001'
        environment:
            DOWNLOADER: "your name"
            SELECTED_PROJECT: "auto"
        restart: on-failure
        labels:
            - com.centurylinklabs.watchtower.enable=true
        container_name: archiveteam-warrior

Configuration (please complete the following information):

  • Device: PC
  • OS: Windows 11
  • Browser Firefox
  • Version 121.0.1

Additional info:

Removing the double quotes from the command line seems to make it recognise the env parameters correctly.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions