VirtusLab / scala-cli

Scala CLI is a command-line tool to interact with the Scala language. It lets you compile, run, test, and package your Scala code (and more!)
https://scala-cli.virtuslab.org
Apache License 2.0
554 stars 129 forks source link

Docker container example not working on Windows #3254

Open polkx opened 1 month ago

polkx commented 1 month ago

Version(s) scala-cli 1.5.1 scala 3.5.1 Docker-desktop 4.34.3 Windows 11

Describe the bug I tried to run this example on Windows. When I run the command scala-cli --power package --docker HelloDocker.scala --docker-image-repository hello-docker everything works but when I want to run the image (docker run hello-docker:latest) I get the error:

/app: 1: @echo: not found
: not found
: not found
: not found
/app: 5: @REM: not found
/app: 6: Syntax error: "(" unexpected (expecting "then")

I don't know if this is a problem with my computer or a problem with running it on Windows. I'll add, that it works fine on Mac OS.

Could someone check if it works on Windows and why I get this error?

polkx commented 1 month ago

If I execute the command scala-cli --power package --docker HelloDocker.scala --docker-image-repository hello-docker on the Ubuntu 24 (WSL) environment then the created image works on both environments (WSL and Windows) (command docker run hello-docker:latest).