Invalid path prefix while running it in Docker
Dgame opened this issue · 4 comments
Hi, nice project, but it doesn't seem to work as described when running the project in a Linux Docker environment. I get the following error:
editorconfig-checker
/var/www/html/vendor/editorconfig-checker/editorconfig-checker/bin/editorconfig-checker: line 2: .//var/www/html/vendor/editorconfig-checker/editorconfig-checker/bin/ec: No such file or directory
The problem is the leading ./
but I don't know where it comes from. If I run /var/www/html/vendor/editorconfig-checker/editorconfig-checker/bin/ec
it works just fine.
I am using WSL on Windows 10, Docker environment is running under WSL.
Hey thank you for that issue.
Could you give me a minimal reproducible example of your Dockerfile/image you are running on?
Also: could you try to check if the same happens when you use https://github.com/editorconfig-checker/editorconfig-checker directly without the PHP wrapper?
@Dgame Can you add the first version the issue appeared to you and additionally test if it still happens with the latest version?
And are symbolic links in use? ./ may suggest that but details of your setup aren't visible enough for me to know that.
If so, are those created on Windows or WSL side or both?
Hey, I don't use this as it didn't work and I didn't want to waste too much time. I use a couple of other style checkers that work well, so I don't have a need for this anymore - which means my configurations are long gone and I can't say for sure which version it was that I was testing (I suspect the latest version at the time). But there were no symbolic links involved, and yes I originally created it in WSL, but that shouldn't make any difference as all the setup was done in WSL.
So from my side, the issue can be closed :) Keep up the good work!
Well fine then and thanks for the update. Please close the issue as it's not reproducible any longer. @Dgame.
But there were no symbolic links involved, and yes I originally created it in WSL, but that shouldn't make any difference as all the setup was done in WSL.
Indeed this is not an issue any longer.
(<<'EOD' docker build --force-rm --tag ec-docker-test --no-cache -- -
FROM composer:2.1.12
RUN set -xe \
; composer -n --no-scripts --no-plugins --version \
; composer -n --no-scripts --no-plugins require --dev editorconfig-checker/editorconfig-checker \
; vendor/bin/ec --version
EOD
; docker=$?; docker image rm ec-docker-test; (exit $docker) && :)
Output:
Sending build context to Docker daemon 2.048kB
Step 1/2 : FROM composer:2.1.12
---> a0735fa25502
Step 2/2 : RUN set -xe ; composer -n --no-scripts --no-plugins --version ; composer -n --no-scripts --no-plugins require --dev editorconfig-checker/editorconfig-checker ; vendor/bin/ec --version
---> Running in 081a5075ad2f
+ composer -n --no-scripts --no-plugins --version
Composer version 2.1.12 2021-11-09 16:02:04
+ composer -n --no-scripts --no-plugins require --dev editorconfig-checker/editorconfig-checker
Using version ^10.2 for editorconfig-checker/editorconfig-checker
./composer.json has been created
Running composer update editorconfig-checker/editorconfig-checker
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
- Locking editorconfig-checker/editorconfig-checker (10.2.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Downloading editorconfig-checker/editorconfig-checker (10.2.4)
- Installing editorconfig-checker/editorconfig-checker (10.2.4): Extracting archive
Generating autoload files
+ vendor/bin/ec --version
2.3.5
Removing intermediate container 081a5075ad2f
---> 14ecd8c0557b
Successfully built 14ecd8c0557b
Successfully tagged ec-docker-test:latest
Untagged: ec-docker-test:latest
Deleted: sha256:14ecd...
Deleted: sha256:d4860...