Skip to content

instructions for non-localhost docker #1569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ljubomirb opened this issue Apr 28, 2020 · 3 comments
Closed

instructions for non-localhost docker #1569

ljubomirb opened this issue Apr 28, 2020 · 3 comments

Comments

@ljubomirb
Copy link

Maybe, if possible, to change instructions to allow this to work out of the box, on remote docker.
I followed instructions to install in remote docker server (not localhost), however, this does not work:

docker run -it -p 127.0.0.1:8080:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest

The problem is - it is not accesible at <remote_ip>:8080
I'm guessing it is this docker line that needs to be changed, if that would be the case.

However, not being that familiar with docker, I added simple nginx proxy to try it from <remote_ip>82/vs:

server {
        listen 82;
        listen [::]:82;

        index index.html;

location /vs/ {
      proxy_pass http://localhost:8080/;
      proxy_set_header Host $host;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection upgrade;
      proxy_set_header Accept-Encoding gzip;
  }
}

And now it works, although here we have another problem (non secure, copy paste does not work), but that is another issue.

@cmoog
Copy link
Contributor

cmoog commented Apr 28, 2020

Thank you for bringing this to our attention. We are aware that the setup documentation is confusing and lacking at the moment. #1447 #1396 should help to improve this.

The intent of the docker run quick start is to demo code-server for users on their local machine. In this case, 127.0.0.1:8080 makes sense.

@nhooyr
Copy link
Contributor

nhooyr commented Apr 28, 2020

Yes, closing as duplicate of the other issues. You want to change the 127.0.0.1 to 0.0.0.0.

@nhooyr nhooyr closed this as completed Apr 28, 2020
@ljubomirb
Copy link
Author

@nhooyr , what can you, please, change instructions. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants