expose
expose copied to clipboard
`--token=...` parameter for `expose share` command?
Hello there, fantastic resource!
Just setting it up as a small extra for local development, but wondering what I'm doing wrong?
Added the following command to my bash script:
docker run --init beyondcodegmbh/expose-server share http://website.local "$@"
It then tells me:
Authentication failed. Please check your authentication token and try again.
I have setup an account and sourced an auth token. How would you suggest I provide the token using docker run ...?
Was wondering about a --token=[token] parameter, but perhaps you know a better way to do this!
Hi!
I've run on the same issue this morning, and you can solve it by providing a config file containing your token to the container.
If the config file is named expose-config.php, add -v $PWD/expose-config.php:/src/config/expose.php to the docker run command.
I hope it helps!
As I'm not a Docker expert/user myself I'd appreciate any PRs that improve on the Docker configuration and documentation.
Hi Marcel,
Would the --token parameter idea from @mrspence make sense for the project according to you?
It would serve more people than a solution oriented only to Docker users.
I'm not familiar with the project code at all and don't know how easy it could be to add but I could take a look if this is a solution you might consider.
@SelrahcD's sweet fix with overriding via volumes should work well in the meantime, however this seems vulnerable to breaking the underlying code when updating (i.e. config options may be missing, folder structure may change e.t.c.)
A parameter or environmental variable would be better suited, but certainly requires an update on the docker image! 😅
(Btw cheers for your help @SelrahcD 👍👍)
Isn't this the same as using the --auth= option?
Is there any documentation on how to use the --auth= option?
Hello, I think --token is needed because --auth is the basic auth for admin dashboard (if i understand the doc)
I'm currently stuck when i try to use expose on docker container as client and it's return me an authentication error:
docker run --init beyondcodegmbh/expose-server share http://127.0.0.1:1880
Authentication failed. Please check your authentication token and try again. Register at https://expose.dev to get your free token. Connection to server closed.
If i read the config/expose.php file the username and password is only used to protect admin dashboard using basic http auth. https://github.com/beyondcode/expose/blob/master/config/expose.php#L331
So now when i try to run docker run expose share i need to "link" the container with my expose account using the token provided here:

So actually using expose inside a docker container not work until I add my own token in my own Dockerfile following this file
RUN /src/expose token aaaa00000-1111-2222-3333-44444455555
Is somebody manage to use expose on docker containers one for client side and second for server side?
I played around with expose's Docker setup and found a way to set the token without modifying the image or adding volumes.
Just override the default command with a Docker argument, executing two commands instead.
docker run --entrypoint bash beyondcodegmbh/expose-server:latest -c "./expose token xxx-xxx-xxx-xxx-xxx && ./expose share"
Does this dockerized expose server work sharing local sites?
the --auth= flag seems to work but then the tunneling looks like not getting to my other dockerized apps, however if I run expose as a .phar it works as expected
Same issue here @BadChoice anything ever develop from this? I'm trying to expose my Laravel app, I am using Sail as well, and I was using Sail's share feature but then was running issues to ports not being available for certain parts, so running the expose docker image now and trying to get it to expose my Laravel container.
Closing this issue because it's old. Please feel free to open a new one if it's still relevant.