question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

chown command doesn't exist on docker toolbox

See original GitHub issue

expected behaviour

The VNC viewer should start without issue on Docker Toolbox. The command scbw.play shouldn’t required to work only with Docker for Windows(which require Hyper-V). The p

actual behaviour

scbw.play crash when performing while it chown doesn’t exist on docker toolbox for window.

There should be a workaround instead of using: COPY --chown=starcraft:users starcraft.zip $SC_DIR

I did a bit of search about the issue and found this. So maybe using usermod could fix this issue. RUN usermod -u 1000 $SC_DIR

steps to reproduce

$ scbw.play --bots "krasi0" "CherryPi" --log_level=DEBUG --show_all
INFO checking docker version
DEBUG Using docker API version b"'1.26'\n"
INFO checking docker can run
INFO checking docker has network sc_net
DEBUG docker network id: b'2335fa0e8d4b\n'
INFO checking if there is local image starcraft:game
DEBUG docker image id: b''
INFO creating docker local image
INFO copying files from c:\python\python36_64\lib\site-packages\scbw/local_docker to C:\Users\<myuser>\AppData\Roaming/scbw/docker
INFO building local image starcraft:game, this may take a while...
Sending build context to Docker daemon  105.7MB
Step 1/13 : FROM starcraft:java
 ---> 9a75b8b8f224
Step 2/13 : MAINTAINER Michal Sustr <michal.sustr@aic.fel.cvut.cz>
 ---> Using cache
 ---> 0a0c8bc4abe9
Step 3/13 : USER starcraft
 ---> Using cache
 ---> ecedf151acef
Step 4/13 : WORKDIR $SC_DIR
 ---> Using cache
 ---> 6b99795e8a08
Step 5/13 : COPY --chown=starcraft:users starcraft.zip $SC_DIR
Unknown flag: chown
ERROR An error occurred while trying to build local image
Traceback (most recent call last):
  File "c:\python\python36_64\lib\site-packages\scbw\docker.py", line 123, in create_local_image
    raise DockerException()
scbw.error.DockerException

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\python\python36_64\lib\site-packages\scbw\cli.py", line 134, in main
    game_result = run_game(args)
  File "c:\python\python36_64\lib\site-packages\scbw\game.py", line 88, in run_game
    check_docker_requirements(args.docker_image)
  File "c:\python\python36_64\lib\site-packages\scbw\docker.py", line 162, in check_docker_requirements
    check_docker_has_local_image(image) or create_local_image()
  File "c:\python\python36_64\lib\site-packages\scbw\docker.py", line 128, in create_local_image
    raise DockerException(f"An error occurred while trying to build local image")
scbw.error.DockerException: An error occurred while trying to build local image

operating system

windows 10 note: i tried on ubuntu without issue

docker version

output of command docker version: $ docker version Client: Version: 17.07.0-ce API version: 1.26 (downgraded from 1.31) Go version: go1.8.3 Git commit: 8784753 Built: Tue Aug 29 17:41:05 2017 OS/Arch: windows/amd64

Server: Version: 1.13.1 API version: 1.26 (minimum version 1.12) Go version: go1.7.5 Git commit: 092cba3 Built: Wed Feb 8 08:47:51 2017 OS/Arch: linux/amd64 Experimental: false

scbw version

output of command scbw.play -v 0.2a19

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:20 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kant2002commented, Jan 24, 2018

On Docker for Windows //c/ replacement works too.

1reaction
kant2002commented, Jan 23, 2018

I could test both commands tomorrow morning, when I will be in the office (GMT+6). I run Docker for Windows so I would like to verify that C: replacement with //c/ will work for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

why doesn't chown work in Dockerfile? [closed] - Stack Overflow
Answering my own question: it's declared to be a volume. If you take out the VOLUME instruction, the chown takes effect.
Read more >
Docker Engine post-installation steps
These optional post-installation procedures shows you how to configure your Linux host machine to work better with Docker.
Read more >
Attempting to change ownership or permissions on a bind ...
The following command should work, and does on files created by e.g. "docker exec ... chown command doesn't exist on docker toolbox ......
Read more >
How to chown or write to my pipeline container for testing?
I have a docker image I am running to test our web application. The problem comes from a write permission docker-compose run --rm....
Read more >
Docker Permission Error: Script Failed to Run when running ...
docker /config.json path and file exist. If the path and file do not exist, create them by running the following commands from the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found