Closed SydneyOwl closed 1 year ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
Are you modifying anything as part of the build and if so what?
We don't test on or support Windows, and it's certainly possible that it is affecting the build process.
My money is on the executable bit getting lost during clone on Windows
I didn't modifying anything, just simply build and run the image. And seems it's not working after I manually added chmod -R 755 /etc/s6-overlay/s6-rc.d
to dockerfile and build/run again like this:
... Really weird.
I also tried run
init-code-server
manually after entering the container:
it said no such file 'bash'. And I am wondering if this has something to do with the Shebang
#!/usr/bin/with-contenv bash
...Maybe s6-overlay is not compatible on windows platform? I noticed that the base image uses s6 to control processes.
I tried modifying the original files so as to removing s6 and using debian as the baseimage just like this: https://github.com/sydneyowl/docker-code-server. And it works on my windows system.
Let's take a step back. Why are you building instead of pulling?
I want to do some changes to the original dockerfile so I have to build it.
And I just found that image pulled directly can run on windows:
And image build on wsl(ubuntu, amd64) via dockerfile is able to run:
That all suggests something is getting messed up due to git clone on Windows filesystem.
You most likely don't have to edit the Dockerfile. We already publish a bunch of mods for it. And for other things, you can do custom scripts: https://www.linuxserver.io/blog/2019-09-14-customizing-our-containers
You're right. I use dos2unix
to change all scripts in /etc
to unix format and build again. This time it works,
thanks!
Is there an existing issue for this?
Current Behavior
I built image via
docker build --no-cache --pull -t lscr.io/linuxserver/code-server:latest .
and started it by runningon a windows platform, But it is not working as expected. In docker log it says,
I've not tried building and running it in a linux environment so I am wondering if docker-code-server does not support windows platform so far?
Expected Behavior
Execute startup script properly.
Steps To Reproduce
Environment
CPU architecture
x86-64
Docker creation
Container logs