mirror of
https://github.com/schollz/croc.git
synced 2025-10-11 05:11:06 +02:00
Merge pull request #185 from xenrox/docker-pass-support
Support relay password for docker
This commit is contained in:
commit
493ae9306d
3 changed files with 9 additions and 3 deletions
|
@ -10,6 +10,6 @@ EXPOSE 9010
|
||||||
EXPOSE 9011
|
EXPOSE 9011
|
||||||
EXPOSE 9012
|
EXPOSE 9012
|
||||||
EXPOSE 9013
|
EXPOSE 9013
|
||||||
COPY --from=builder /go/croc/croc /croc
|
COPY --from=builder /go/croc/croc /go/croc/croc-entrypoint.sh /
|
||||||
ENTRYPOINT ["/croc"]
|
ENTRYPOINT ["/croc-entrypoint.sh"]
|
||||||
CMD ["relay"]
|
CMD ["relay"]
|
||||||
|
|
|
@ -132,7 +132,7 @@ If it's easier you can also run a relay with Docker:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -d -p 9009:9009 -p 9010:9010 -p 9011:9011 -p 9012:9012 -p 9013:9013 schollz/croc
|
$ docker run -d -p 9009:9009 -p 9010:9010 -p 9011:9011 -p 9012:9012 -p 9013:9013 -e CROC_PASS='YOURPASSWORD' schollz/croc
|
||||||
```
|
```
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
6
croc-entrypoint.sh
Executable file
6
croc-entrypoint.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
if [ -n "$CROC_PASS" ]; then
|
||||||
|
set -- --pass "$CROC_PASS" "$@"
|
||||||
|
fi
|
||||||
|
exec /croc "$@"
|
Loading…
Add table
Add a link
Reference in a new issue