Skip to content
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

How to run the docker image as a service? #188

Closed
zblesk opened this issue Aug 24, 2018 · 6 comments
Closed

How to run the docker image as a service? #188

zblesk opened this issue Aug 24, 2018 · 6 comments
Labels

Comments

@zblesk
Copy link

zblesk commented Aug 24, 2018

I successfully ran the Docker image (Ubuntu 18.04 LTS) in interactive mode as described in the docs.
However, I haven't been able to run it as a service and connect to it from outside - I couldn't coax it to keep running as a service, even when I try running it e.g. detached, it never even shows up among running containers.

I only have limited experience with Docker, so maybe I've missed something obvious.

Thanks for any help.

@j-rewerts
Copy link
Member

j-rewerts commented Aug 25, 2018

Hey @zblesk . Could you post both the command you ran as well as the output from the shell?

docker run -it --rm browsh/browsh works for me

@tombh
Copy link
Member

tombh commented Aug 26, 2018

Oh, the HTTP service?

That's a very good point, I never documented how you actually pass arguments to the Docker version. I'm not at my dev computer at the moment, but I think you should be able to do; docker run -it --rm --port 4333:4333 browsh/browsh browsh --http-server-mode.

If not then you should be able to boot the container into BASH with; docker run -it --rm --port 4333:4333 browsh/browsh bash and then from the new prompt you can run; browsh --http-server-mode.

Then you can access the Browsh HTTP service locally at http://localhost:4333 :)

@zblesk
Copy link
Author

zblesk commented Aug 27, 2018

Thanks.

Yes, docker run -it --rm browsh/browsh is exactly what I tried, and it worked, I was able to browse (as long as I used SSH, not Mosh).

Perhaps I either didn't describe it well enough, or I misunderstood Browsh's purpose.

I wanted to make browsh run automatically on server startup, have it run in the background unattended, and connect via SSH (the way it works with ssh brow.sh) or via the browser.

Should I always SSH, then run the docker image, then start browsing?

(Tried the other commands @tombh suggested, they don't work ('unknown flag --port').)

@tobimensch
Copy link
Collaborator

@zblesk
You could try starting docker inside screen or tmux to keep the session running. Then (re)connect with ssh or mosh. I like byobu as a frontend for screen/tmux.

@j-rewerts
Copy link
Member

@zblesk Could you post this to our Gitter getting started room? I should be able to walk you through it when you get a chance.

@tombh
Copy link
Member

tombh commented Aug 31, 2018

Ah I see now. Yeah I think @tobimensch probably has the best idea. The only difference from ssh brow.sh really is that you'll have to SSH and then run tmux attach or whatever.

And do take up @j-rewerts offer!

You can have exactly the same setup as ssh brow.sh by using the Docker image that we use for that service: https://github.com/browsh-org/baas/tree/master/ssh-server It will need a couple of config files though I think. I don't have time to try that out right now I'm afraid. But if you want to give it a go, you can build it yourself or just try running this: docker run -it --rm gcr.io/browsh-193210/baas, if it works then it'll have SSH on port 2222, ready to go.

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

No branches or pull requests

4 participants