Docker image support reading variables from environment( command arguments or environment variables ) is a best practice in container world(e.g Prometheus, Grafana, Jaeger, Envoy). I think we should support this in APISIX docker image, keep CI configurations as simple as possible.
junxu chen <[email protected]> 于2020年8月17日周一 下午6:16写道: > > GitHub Actions is also contains shell script, why cannot mount file for > docker? > > Yes, we can mount files by running docker with shell. > > But this way has other problems. The github action uses a network with a > random name. > It is not easy for us to get the name of this network to join this network. > > We also cannot use `host.docker.internal` to access the host. > > Therefore, in the APISIX docker container etcd is not accessible. > > Of course, it is possible to resolve the problem, but it is too difficult > for users. > > On Mon, Aug 17, 2020 at 4:38 PM Ming Wen <[email protected]> wrote: > > > Can you show a example? > > GitHub Actions is also contains shell script, why cannot mount file for > > docker? > > > > Thanks, > > Ming Wen, Apache APISIX & Apache SkyWalking > > Twitter: _WenMing > > > > > > junxu chen <[email protected]> 于2020年8月17日周一 下午4:30写道: > > > > > > Can config.yaml be used as an external file for Apache APISIX in > > docker? > > > > > > It is ok under normal circumstances. But in the github action, > > `services` > > > or `container` is the earliest initialization, and then the file can be > > > cloned from the repo. So we couldn't mount the `config.yaml`. > > > > > > > > > > > > On Mon, Aug 17, 2020 at 4:15 PM Ming Wen <[email protected]> wrote: > > > > > > > > 1. APISIX supports specifying etcd host through environment > variables > > > > Can config.yaml be used as an external file for Apache APISIX in > > docker? > > > > > > > > Thanks, > > > > Ming Wen, Apache APISIX & Apache SkyWalking > > > > Twitter: _WenMing > > > > > > > > > > > > Ming Wen <[email protected]> 于2020年8月17日周一 下午4:10写道: > > > > > > > > > > Then I found that the current APISIX docker image is not > convenient > > > to > > > > > use in github actions. > > > > > Why is it inconvenient? After understanding the reason, we can > > discuss > > > > how > > > > > to solve it. > > > > > > > > > > Thanks, > > > > > Ming Wen, Apache APISIX & Apache SkyWalking > > > > > Twitter: _WenMing > > > > > > > > > > > > > > > junxu chen <[email protected]> 于2020年8月17日周一 下午3:20写道: > > > > > > > > > >> Hi, all > > > > >> > > > > >> Recently I am working on a github action, this github action > depends > > > on > > > > >> APISIX, I need to reference APISIX in my test cases. Then I found > > that > > > > the > > > > >> current APISIX docker image is not convenient to use in github > > > actions. > > > > >> > > > > >> There are two ways to improve this problem: > > > > >> 1. APISIX supports specifying etcd host through environment > > variables > > > > >> 2. Build a new docker image that integrates etcd and APISIX > > > > >> > > > > >> I prefer the second way, which is more convenient for users to > test > > > > APISIX > > > > >> using docker without installing docker-compose. > > > > >> > > > > >> What do you think? > > > > >> > > > > >> Or there is a way that use APISIX in github actions directly > without > > > > >> changing, please tell me. > > > > >> > > > > >> Thank you! > > > > >> > > > > > > > > > > > > > > >
