Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command not found running in docker container #37

Closed
turchinc opened this issue Oct 27, 2023 · 2 comments
Closed

command not found running in docker container #37

turchinc opened this issue Oct 27, 2023 · 2 comments

Comments

@turchinc
Copy link

Probably this is a problem with dart-sass and not the plugin per-se but I am seeing the following after adding to our build.

Running the plugin locally (windows and ubuntu-linux) I have no problems:

/home/myuser/myrepo/myproduct/portal $ gradle compileSass
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :downloadSass
Download https://github.com/sass/dart-sass/releases/download/1.54.4/dart-sass-1.54.4-linux-x64.tar.gz
BUILD SUCCESSFUL in 13s
3 actionable tasks: 3 executed

But the same command executed in the gradle image gradle:7.5.1-jdk17-alpine in our build pipeline says command not found:

/builds/myproduct/product/myproduct/portal # gradle compileSass
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/7.5.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build 
> Task :downloadSass UP-TO-DATE
> Task :installSass UP-TO-DATE
> Task :compileSass FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileSass'.
> A failure occurred while executing io.miret.etienne.gradle.sass.CompileSassWorkAction
   > A problem occurred starting process 'command '/builds/myproduct/product/myproduct/portal/.gradle/sass/1.54.4/dart-sass/sass''
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
3 actionable tasks: 1 executed, 2 up-to-date

I shelled into the container and the executable is there, but I get the same result on the command line:

/builds/myproduct/product/myproduct/portal/.gradle/sass/1.54.4/dart-sass # $(pwd)/sass
/bin/sh: /builds/myproduct/product/myproduct/portal/.gradle/sass/1.54.4/dart-sass/sass: not found
/builds/myproduct/product/myproduct/portal/.gradle/sass/1.54.4/dart-sass # ls -lah
total 9M     
drwxr-xr-x    3 root     root        4.0K Oct 27 07:40 .
drwxr-xr-x    3 root     root        4.0K Oct 27 07:40 ..
-rwxr-xr-x    1 root     root        9.1M Oct 27 07:40 sass
drwxr-xr-x    2 root     root        4.0K Oct 27 07:40 src
/builds/myproduct/product/myproduct/portal/.gradle/sass/1.54.4/dart-sass # ./sass
/bin/sh: ./sass: not found

What am I missing here? Maybe it cannot run in an alpine environment?

@turchinc
Copy link
Author

Hmm, looks like a known issue: sass/dart-sass-embedded#106

@turchinc
Copy link
Author

yeah change image to gradle:7.5.1-jdk17-jammy and working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant