docker-pyinstaller icon indicating copy to clipboard operation
docker-pyinstaller copied to clipboard

OSError: [WinError 123] Invalid name: '/tmp\\*'

Open max-tet opened this issue 4 years ago • 5 comments

I am seeing this error when running docker-pyinstaller as part of a Gilab CI build script. When running it locally, it works without problems.

This is the CI job:

    stage: build_exec
    image: python:3.8-buster
    script:
        - apt update
        - apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common
        - curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
        - add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
        - apt update
        - apt -y install docker-ce docker-ce-cli containerd.io
        - cd src/backend
        - pip install virtualenv
        - virtualenv --python=python3 venv
        - source venv/bin/activate
        - pip install .
        - pip freeze > requirements.txt
        - echo "$(pwd)"
        - ls
        - docker run -v "$(pwd):/src/" cdrx/pyinstaller-windows
    tags:
        - linux
        - dind
    artifacts:
        name: terminal_desktop_win
        paths:
            - src/backend/dist/windows/main.exe
        expire_in: 1d

The Gitlab runner is my own local dev machine and I configured it with volumes = ["/cache","/var/run/docker.sock:/var/run/docker.sock"], so the python:3.8-buster container should be able to use the docker socket and spin up the cdrx/pyinstaller-windows container as a sibling. Still, this is the result.

$ docker run -v "$(pwd):/src/" cdrx/pyinstaller-windows
537 INFO: PyInstaller: 3.6
538 INFO: Python: 3.7.5
538 INFO: Platform: Windows-7-6.1.7601-SP1
558 INFO: UPX is not available.
559 INFO: Removing temporary files and cleaning cache in C:\users\root\Application Data\pyinstaller
Traceback (most recent call last):
  File "c:\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Python37\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\Python37\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\Python37\lib\site-packages\PyInstaller\building\build_main.py", line 636, in build
    os.makedirs(pth)
  File "c:\Python37\lib\os.py", line 221, in makedirs
    mkdir(name, mode)
OSError: [WinError 123] Invalid name: '/tmp\\*'

I made sure that the spec file is in the CWD as suggested in this ticket. I also tried adding :Z to the volume.

max-tet avatar Mar 29 '20 10:03 max-tet

I'm having the same issue, even when running this locally. I also have tried the the spec file as suggested in max-tet's ticket.

DanielKrolopp avatar May 27 '20 20:05 DanielKrolopp

I had this same issue. Turns out it was mapping directories wrong. I had it running inside of another docker container and it needed the paths for the host directory, not the paths for the container.

m0ngr31 avatar Sep 01 '20 22:09 m0ngr31

got same problem running on Windows and Ubuntu

pwyq avatar Dec 07 '20 12:12 pwyq

Any news on this issue ? I am getting the same with Docker Desktop on Windows 10

nono313 avatar Aug 17 '22 12:08 nono313

The same issue in https://github.com/JackMcKew/pyinstaller-action-windows/issues/3

liyujun-dev avatar Dec 16 '22 01:12 liyujun-dev