1 Commits

Author SHA1 Message Date
Zach Sherman c0931be306 initial commit
remove dependency on entrypoint

also rm glibc and swap .deb for .zip

from comments [here](https://github.com/ngrok/docker-ngrok/pull/1)

create a minimal, flexible entrypoint

per notes [here](https://www.notion.so/ngrok/docker-agent-spec-2076765fbd07499fa742f02b49e1f8a5)
* remove all of the env var stuff except cli args for config and authtoken
* change dockerfile `CMD`s to `ENTRYPOINT`s to allow arbitrary
subcommands and cli args to be used _with_ the environment variable
templating. With the previous design from the other repo, you had to
choose to use only cli arguments or only environment variables. Which is
why they had to support such a complicated mass of env vars. This way
seems far cleaner even if it removes the ability to run arbitrary
non-ngrok commands in the container.

review fixes

* `-config` -> `--config`
* mark entrypoint.sh executable beforehand and remove chmod calls
* save auth token to config file rather than cli args
* remove `set -x` to avoid logging auth tokens
* use a separate debian builder for debian image

cat authtoken into separate config file

make sure the agent uses authtoken config and default config if
`NGROK_AUTHTOKEN` is set but `NGROK_CONFIG` isn't

remove distroless

it's bigger than alpine so not worth supporting for now

move config files to `/var/lib/ngrok`

to avoid conflicting with potential user-mounted configs

add license
2021-06-08 10:41:30 -07:00