Windows command line error messages are confusing, but here's the solution
On Windows 10:
This command:
docker2exe-windows-amd64.exe --name fastled
Produces the following help file instructing me to add in --image
NAME:
docker2exe - create an executable from a docker image
USAGE:
docker2exe-windows-amd64.exe [global options] command [command options] [arguments...]
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--name value name of your executable
--image value name of your docker image
--embed embed a docker image in the binary (default: false)
--workdir value, -w value mount the user's current directory in the image
--env value, -e value whitelist environment variables
--volume value, -v value bind mount a volume
--output value directory to output
--target value, -t value platforms and architectures to target
--module value name of generated golang module
--help, -h show help (default: false)
Required flag "image" not set
But when I do so:
C:\Users\niteris\dev\fastled-wasm>docker2exe-windows-amd64.exe --name fastled --image fastled
go mod init github.com/DESKTOP-I3718DO\Zach Vorhies/fastled
go: 'go mod init' accepts at most one argument
make: *** [go.mod] Error 1
exit status 2
I get this error that makes no sense to me. But I'm not a go programmer.
I was able to work through the problem with AI.
If anyone else stumbles on this same error, it's because you didn't put enough arguments into the command.
Seems like an easy fix to the developer to warn on unexpected number of arguments.. Anyway, here's a full command that's now working for me.
docker2exe-windows-amd64.exe --name fastled --image niteris/fastled-wasm --module "github.com/niteris/fastled-wasm" --embed
Okay, it didn't complete using cmd.exe, complaining about a missing /usr/bin/env
I worked around it by dropping down into git bash and running that same command.