Entrypoint Problem with DockerFile
og-mrk opened this issue · 0 comments
Issue Description
Docker Image not working properly with the commands provided the Wiki, One/two Issues occurred After the process of Building the Docker Image, in other words, the creation of gImageReader Build Env. went well... but the process of making program binaries didn't.
Procedures to Re-create Issue
- Install wsl using
wsl --update
- Enable & Install Windows Hyper-V (Docker depends on it).
- Reboot device
- Install Docker Desktop
you can do it in different ways, using chocolatey package managerchoco install docker-desktop
Or by visiting the official Docker Desktop webpage - Log out and Log back in (To finish Docker Desktop installation)
- Run the Docker Desktop app, It'll take a few seconds, be patient...
- Open a new File explorer window, and go to an empty folder (For the next step)
- Type
powershell.exe
in the Address Bar and pressEnter
(pwsh.exe
if you have it installed) - Clone the Repo with
git clone "https://github.com/manisandro/gImageReader.git"
inside this empty folder cd
(ChangeDirectory) to the Newly cloned repo- Run the following command (Source: Repo Wiki):
docker build -t gimagereader_buildenv packaging/win32
- Wait for a few minutes, and when the Image is finally done and Written to disk, run the follow command:
docker run -v $PWD:/workspace gimagereader_buildenv packaging/win32/makeinstaller.sh x86_64 qt5
First Error (powershell.exe):
At line:1 char:15
+ docker run -v $PWD:/workspace gimagereader_buildenv packaging/win32/m ...
+ ~~~~~
Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to
delimit the name.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidVariableReferenceWithDrive
(pwsh.exe)
ParserError:
Line |
1 | docker run -v $PWD:/workspace gimagereader_buildenv packaging/win32/m …
| ~~~~~
| Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to delimit the name.
Solution 😄 :
instead of
$PWD:/workspace
, make it${PWD}:/workspace
After fixing this problem, another one rises, which's:
exec packaging/win32/makeinstaller.sh: no such file or directory
Solution... at least for me is:
add
--entrypoint /bin/sh
flag+argument to thedocker run
command + Make the NewLines ofpackaging/win32/makeinstaller.sh
fileUnix LF
instead of windows styleCRLF
... it's a weird issue I know... but I hope my experience + the solution(s) I've found could help fix it :D