Apisix-dashboard: feat: Using Dockerfile of apisix-docker project to build E2E test image

Created on 2 Feb 2021  路  9Comments  路  Source: apache/apisix-dashboard

Feature request

Please describe your feature

At present, the Dockfile and Dockerfile-apisix in the dashboard are maintained locally. Two days ago, the relevant dependencies of apisix were modified. The dashboard failed to synchronize in time, resulting in CI errors. So I think we have apisix-docker project. Can we pull the Dockerfile from this project? This will not cause synchronization errors

Describe the solution you'd like

Before executing the docker-compose -d command, CI uses curl -o to pull Dockerfile-dashborad and Dockerfile-apisix files to the local dashboard.

CI backend enhancement

Most helpful comment

@nic-chen
Thks.
Then I'll submit a PR to modify Dockerfile-apisix later.
Please assigne to me.

@Jaycean Regarding to the implementation, AFAIK, docker-compose supports using context to load Dockerfile from remote git repository. Take apisix for example, you could try without pulling the Dockerfile to local.

  apisix:
    hostname: apisix_server1
    build:
      context: https://github.com/apache/apisix-docker.git#master:all-in-one/apisix/
      dockerfile: Dockerfile
      args:
        - APISIX_VERSION=master

All 9 comments

ping @nic-chen @starsz @imjoey

@Jaycean thanks for reporting. It's reasonable for me. Could you please introduce us the differences of the two Dockerfiles in this project and apisix-docker project? Thanks.

hi @Jaycean
Thanks.
Dockerfile-apisix can be used directly in this way, but Dockerfile-dashborad requires an additional modification, which is to use the local source code instead of downloading it from github, because we need to run the latest code to verify the test.

@imjoey
There are two Dockerfiles in apisix-dashborad. One is used to build the manage-api, and the other is used to build apisix.

Apisix-docker project includes the construction of apisix Dockerfile through various operating systems, and the construction of manage-api and apisix Dockerfile through All-in-one

@nic-chen
Thks.
Then I'll submit a PR to modify Dockerfile-apisix later.
Please assigne to me.

@nic-chen
Thks.
Then I'll submit a PR to modify Dockerfile-apisix later.
Please assigne to me.

@Jaycean Regarding to the implementation, AFAIK, docker-compose supports using context to load Dockerfile from remote git repository. Take apisix for example, you could try without pulling the Dockerfile to local.

  apisix:
    hostname: apisix_server1
    build:
      context: https://github.com/apache/apisix-docker.git#master:all-in-one/apisix/
      dockerfile: Dockerfile
      args:
        - APISIX_VERSION=master

docker-compose supports using context to load Dockerfile from remote git repository.

Good to know this tip!

@nic-chen
Thks.
Then I'll submit a PR to modify Dockerfile-apisix later.
Please assigne to me.

@Jaycean Regarding to the implementation, AFAIK, docker-compose supports using context to load Dockerfile from remote git repository. Take apisix for example, you could try without pulling the Dockerfile to local.

  apisix:
    hostname: apisix_server1
    build:
      context: https://github.com/apache/apisix-docker.git#master:all-in-one/apisix/
      dockerfile: Dockerfile
      args:
        - APISIX_VERSION=master

Cool, it's a good way. I like it.

PR has been merged. This issue is closed. If there is a problem, it will be reopened later.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gxthrj picture gxthrj  路  5Comments

juzhiyuan picture juzhiyuan  路  5Comments

juzhiyuan picture juzhiyuan  路  3Comments

stu01509 picture stu01509  路  3Comments

chenyicai picture chenyicai  路  4Comments